Changeset 8331 for branches/ScatterSearch (trunk integration)/HeuristicLab.MainForm/3.3/Interfaces/IProgress.cs
- Timestamp:
- 07/26/12 09:51:13 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.MainForm/3.3/Interfaces/IProgress.cs
r7582 r8331 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 24 25 namespace HeuristicLab.MainForm { 25 public interface IProgress { 26 string Status { get; set; } 27 double ProgressValue { get; set; } 26 public enum ProgressState { Started = 1, Canceled = 2, Finished = 3 }; 28 27 29 void Finish(); 28 public interface IProgress : IContent { 29 /// <summary> 30 /// Gets the currently associated status text with the progress. 31 /// </summary> 32 string Status { get; } 33 /// <summary> 34 /// Gets 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> 37 double ProgressValue { get; } 38 /// <summary> 39 /// Gets the current state of the progress. Every progress starts in state 40 /// 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; } 30 49 31 event EventHandler Finished; 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> 56 /// <param name="timeoutMs">The operation is given a certain timeout to cancel. If the operation doesn't cancel in this time it will be forcibly closed.</param> 57 void Cancel(int timeoutMs); 58 59 /// <summary> 60 /// The status text changed. 61 /// </summary> 32 62 event EventHandler StatusChanged; 63 /// <summary> 64 /// 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. 65 /// </summary> 33 66 event EventHandler ProgressValueChanged; 67 /// <summary> 68 /// The state of the progress changed. The handler is supposed to query the ProgressState property. 69 /// </summary> 70 event EventHandler ProgressStateChanged; 71 /// <summary> 72 /// The progress' ability to cancel changed. 73 /// </summary> 74 event EventHandler CanBeCanceledChanged; 75 /// <summary> 76 /// A cancelation is requested with a certain timeout (in ms) in which it should occur gracefully. If the timeout is surpassed, it should be forcibly canceled. 77 /// </summary> 78 event EventHandler<EventArgs<int>> CancelRequested; 34 79 } 35 80 }
Note: See TracChangeset
for help on using the changeset viewer.