Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/28/12 12:00:51 (12 years ago)
Author:
ascheibe
Message:

#1762 implemented review comments:

  • removed self disposing. The progress view now reacts if a progress is set and Finish() is now called on the progress object and not the view.
  • Moved Cancel event from ProgressView to Progress
  • throw ArgumentNullException if the parent view is null
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Access.Views/3.3/ClientViews/ClientView.cs

    r8143 r8145  
    3535
    3636    private ProgressView progressView;
     37    IProgress progress;
    3738
    3839    public ClientView() {
    3940      InitializeComponent();
     41      progressView = new ProgressView(this);
    4042    }
    4143
     
    8284        Invoke(new Action(StartProgressView));
    8385      } else {
    84         if (progressView == null) {
    85           IProgress prog = new Progress();
    86           prog.Status = "Downloading client information. Please be patient.";
    87           progressView = new ProgressView(this, prog);
    88         }
     86        progress = new Progress();
     87        progress.Status = "Downloading client information. Please be patient.";
     88        progressView.Progress = progress;
    8989      }
    9090    }
     
    9494        Invoke(new Action(FinishProgressView));
    9595      } else {
    96         if (progressView != null) {
    97           progressView.Finish();
    98           progressView = null;
    99           SetEnabledStateOfControls();
    100         }
     96        progress.Finish();
     97        SetEnabledStateOfControls();
    10198      }
    10299    }
Note: See TracChangeset for help on using the changeset viewer.