Changeset 17062 for stable/HeuristicLab.MainForm/3.3
- Timestamp:
- 07/04/19 14:45:47 (5 years ago)
- Location:
- stable
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
-
stable/HeuristicLab.MainForm/3.3/HeuristicLab.MainForm-3.3.csproj
r11920 r17062 124 124 <Compile Include="Interfaces\IProgress.cs" /> 125 125 <Compile Include="Plugin.cs" /> 126 <Compile Include="Progress.cs" />127 126 <Compile Include="ViewAttribute.cs" /> 128 127 <Compile Include="Interfaces\IContentView.cs" /> -
stable/HeuristicLab.MainForm/3.3/Interfaces/IProgress.cs
r15584 r17062 24 24 25 25 namespace HeuristicLab.MainForm { 26 public enum ProgressState { Started = 1, Canceled = 2, Finished = 3 }; 26 public enum ProgressState { Started, Finished, StopRequested, CancelRequested } 27 public enum ProgressMode { Determinate, Indeterminate } 27 28 28 29 public interface IProgress : IContent { 30 ProgressState ProgressState { get; } 31 32 string Message { get; set; } 33 34 ProgressMode ProgressMode { get; set; } 29 35 /// <summary> 30 /// Gets or sets the currently associated status text with the progress. 36 /// Gets or sets the currently associated progress value in the range [0;1] (values outside the range are truncated). 37 /// Changing the ProgressValue when <c>ProgressMode</c> is <c>Indeterminate</c> raises an Exception. 31 38 /// </summary> 32 string Status { get; set; } 33 /// <summary> 34 /// Gets or sets the currently associated progress value in the range (0;1]. 35 /// Values outside this range are permitted and need to be handled in some feasible manner. 36 /// </summary> 39 /// <exception cref="InvalidOperationException">Setting the ProgressValue-property while in the Indeterminate state is invalid.</exception> 37 40 double ProgressValue { get; set; } 38 /// <summary>39 /// Gets or sets the current state of the progress. Every progress starts in state40 /// Started and then becomes either Canceled or Finished.41 /// If it is reused it may be Started again.42 /// </summary>43 ProgressState ProgressState { get; }44 /// <summary>45 /// Returns whether the operation can be canceled or not.46 /// This can change during the course of the progress.47 /// </summary>48 bool CanBeCanceled { get; }49 41 50 /// <summary>51 /// Requests the operation behind the process to cancel.52 /// Check the !ProgressState property when the cancellation succeeded. 53 /// The corresponding event will also notify of a success.54 /// </summary>55 /// <exception cref="NotSupportedException">Thrown when cancellation is not supported.</exception>42 bool CanBeStopped { get; set; } 43 bool CanBeCanceled { get; set; } 44 45 void Start(string message, ProgressMode mode = ProgressMode.Determinate); 46 void Finish(); 47 void Stop(); 56 48 void Cancel(); 57 /// <summary>58 /// Sets the ProgressValue to 1 and the ProgressState to Finished.59 /// </summary>60 void Finish();61 49 62 /// <summary> 63 /// Starts or restarts a Progress. 64 /// </summary> 65 void Start(); 66 67 void Start(string status); 68 69 /// <summary> 70 /// The status text changed. 71 /// </summary> 72 event EventHandler StatusChanged; 73 /// <summary> 74 /// The value of the progress changed. This is the (0;1] progress value from starting to finish. Values outside this range are permitted and need to be handled in some feasible manner. 75 /// </summary> 50 event EventHandler ProgressStateChanged; 51 event EventHandler MessageChanged; 52 event EventHandler ProgressBarModeChanged; 76 53 event EventHandler ProgressValueChanged; 77 /// <summary> 78 /// The state of the progress changed. The handler is supposed to query the ProgressState property. 79 /// </summary> 80 event EventHandler ProgressStateChanged; 81 /// <summary> 82 /// The progress' ability to cancel changed. 83 /// </summary> 54 event EventHandler CanBeStoppedChanged; 84 55 event EventHandler CanBeCanceledChanged; 85 /// <summary> 86 /// A cancelation is requested. 87 /// </summary> 56 event EventHandler StopRequested; 88 57 event EventHandler CancelRequested; 89 58 }
Note: See TracChangeset
for help on using the changeset viewer.