Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/29/12 23:12:32 (12 years ago)
Author:
abeham
Message:

#1762: Some changes to progress handling, see the ticket for more details

File:
1 edited

Legend:

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

    r8160 r8165  
    3535
    3636    private ProgressView progressView;
    37     IProgress progress;
     37    private Progress progress;
    3838
    3939    public ClientView() {
    4040      InitializeComponent();
    41       progressView = new ProgressView(this);
     41      progress = new Progress() {
     42        CanBeCanceled = false,
     43        ProgressState = ProgressState.Finished
     44      };
     45    }
     46
     47    protected override void DeregisterContentEvents() {
     48      if (progressView != null) {
     49        progressView.Content = null;
     50        progressView.Dispose();
     51        progressView = null;
     52      }
     53      base.DeregisterContentEvents();
     54    }
     55
     56    protected override void RegisterContentEvents() {
     57      base.RegisterContentEvents();
     58      progressView = new ProgressView(this, progress);
    4259    }
    4360
     
    84101        Invoke(new Action(StartProgressView));
    85102      } else {
    86         progress = new Progress();
    87103        progress.Status = "Downloading client information. Please be patient.";
    88         progressView.Progress = progress;
     104        progress.ProgressState = ProgressState.Started;
    89105      }
    90106    }
Note: See TracChangeset for help on using the changeset viewer.