- Timestamp:
- 07/03/12 16:46:35 (12 years ago)
- Location:
- branches/GP-MoveOperators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-MoveOperators
- Property svn:mergeinfo changed
/trunk/sources merged: 8084,8088-8090,8092-8100,8102-8113,8115,8117-8132,8134-8146,8148-8156,8158-8160,8163-8170,8173-8176,8178-8190,8192-8205
- Property svn:mergeinfo changed
-
branches/GP-MoveOperators/HeuristicLab.MainForm/3.3/Interfaces/IProgress.cs
r7582 r8206 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.