Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/11/17 10:00:34 (7 years ago)
Author:
pfleck
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/EnhancedProgress/HeuristicLab.MainForm/3.3/Progress.cs

    r15415 r15417  
    7070    }
    7171
    72     private bool visible;
    73     public bool Visible {
    74       get { return visible; }
    75       set {
    76         if (visible != value) {
    77           visible = value;
    78           OnVisibleChanged();
    79         }
    80       }
    81     }
    82 
    8372    private bool canBeStopped;
    8473    public bool CanBeStopped {
     
    115104      ProgressBarMode = ProgressBarMode.Marquee;
    116105      Message = message;
    117       Visible = true;
    118106    }
    119107    public void Start(string message, double progressValue) {
     
    122110      ProgressValue = progressValue;
    123111      Message = message;
    124       Visible = true;
    125112    }
    126113
     
    129116        ProgressValue = 1.0;
    130117      ProgressState = ProgressState.Finished;
    131       Visible = false;
    132118    }
    133119
    134120    public void Stop() {
    135121      if (canBeStopped) {
    136         ProgressState = ProgressState.Stopped;
     122        ProgressState = ProgressState.StopRequested;
    137123        OnStopRequested();
    138124      } else throw new NotSupportedException("This progress cannot be stopped.");
     
    140126    public void Cancel() {
    141127      if (canBeCanceled) {
    142         ProgressState = ProgressState.Canceled;
     128        ProgressState = ProgressState.CancelRequested;
    143129        OnCancelRequested();
    144130      } else throw new NotSupportedException("This progress cannot be canceled.");
     
    170156    }
    171157
    172     public event EventHandler VisibleChanged;
    173     private void OnVisibleChanged() {
    174       var handler = VisibleChanged;
    175       if (handler != null) handler(this, EventArgs.Empty);
    176     }
    177 
    178158    public event EventHandler CanBeStoppedChanged;
    179159    private void OnCanBeStoppedChanged() {
Note: See TracChangeset for help on using the changeset viewer.