Free cookie consent management tool by TermsFeed Policy Generator

source: branches/EnhancedProgress/HeuristicLab.MainForm/3.3/Interfaces/IProgress.cs @ 15417

Last change on this file since 15417 was 15417, checked in by pfleck, 7 years ago

#2845 Removed Visible property and hide on "Finished".

File size: 2.3 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using HeuristicLab.Common;
24
25namespace HeuristicLab.MainForm {
26  public enum ProgressState { Started, Finished, StopRequested, CancelRequested }
27  public enum ProgressBarMode { Continuous, Marquee }
28
29  public interface IProgress : IContent {
30    ProgressState ProgressState { get; }
31    string Message { get; set; }
32    ProgressBarMode ProgressBarMode { get; set; }
33    /// <summary>
34    /// Gets or sets the currently associated progress value in the range [0;1] (values outside the range are truncated).
35    /// Changing the ProgressValue when ProgressBarMode is Marquee raises an Exception.
36    /// </summary>
37    double ProgressValue { get; set; }
38    bool CanBeStopped { get; }
39    bool CanBeCanceled { get; }
40
41    /// <summary>
42    /// Start (or Restart) a progress with ProgressBarMode Marquee
43    /// </summary>
44    void Start(string message);
45    /// <summary>
46    /// Start (or Restart) a progress with ProgressBarMode Continues
47    /// </summary>
48    void Start(string message, double progressValue);
49    void Finish();
50    void Stop();
51    void Cancel();
52
53    event EventHandler ProgressStateChanged;
54    event EventHandler MessageChanged;
55    event EventHandler ProgressBarModeChanged;
56    event EventHandler ProgressValueChanged;
57    event EventHandler CanBeStoppedChanged;
58    event EventHandler CanBeCanceledChanged;
59    event EventHandler StopRequested;
60    event EventHandler CancelRequested;
61  }
62}
Note: See TracBrowser for help on using the repository browser.