Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/22/18 12:37:04 (5 years ago)
Author:
pfleck
Message:

#2845 Combined separate Show methods into single one with enum parameter specifying the ProgressMode. Renamed Continuous and Marquee to Determinate and Indeterminate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2845_EnhancedProgress/HeuristicLab.MainForm/3.3/Interfaces/IProgress.cs

    r16311 r16317  
    2525namespace HeuristicLab.MainForm {
    2626  public enum ProgressState { Started, Finished, StopRequested, CancelRequested }
    27   public enum ProgressBarMode { Continuous, Marquee }
     27  public enum ProgressMode { Determinate, Indeterminate }
    2828
    2929  public interface IProgress : IContent {
    3030    ProgressState ProgressState { get; }
     31
    3132    string Message { get; set; }
    32     ProgressBarMode ProgressBarMode { get; set; }
     33
     34    ProgressMode ProgressMode { get; set; }
    3335    /// <summary>
    3436    /// 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.
     37    /// Changing the ProgressValue when <c>ProgressMode</c> is <c>Indeterminate</c> raises an Exception.
    3638    /// </summary>
    37     /// <exception cref="InvalidOperationException">Setting the ProgressValue-property while in the Marquee state is invalid.</exception>
     39    /// <exception cref="InvalidOperationException">Setting the ProgressValue-property while in the Indeterminate state is invalid.</exception>
    3840    double ProgressValue { get; set; }
    39     bool CanBeStopped { get; }
    40     bool CanBeCanceled { get; }
    4141
    42     /// <summary>
    43     /// Start (or Restart) a progress in ProgressBarMode Continues to display specific progress values (from 0 to 1).
    44     /// A new progress value is reported by setting the ProgressValue-property.
    45     /// </summary>
    46     void Start(string message, double progressValue = 0);
     42    bool CanBeStopped { get; set; }
     43    bool CanBeCanceled { get; set; }
    4744
    48     /// <summary>
    49     /// Start (or Restart) a progress in ProgressBarMode Marquee to define an "unknown" progress state.
    50     /// Consider using marquee when the progress is not measurable but the user should be notified that something is still happening.
    51     /// Setting the ProgressValue-property in the Marquee state throws an exception.
    52     /// </summary>
    53     void StartMarquee(string message);
    54 
     45    void Start(string message, ProgressMode mode = ProgressMode.Determinate);
    5546    void Finish();
    5647    void Stop();
Note: See TracChangeset for help on using the changeset viewer.