Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/21/13 23:08:47 (11 years ago)
Author:
ascheibe
Message:

#1042

  • applied mkommends progress view patch
  • adapted Hive views accordingly
  • made some minor improvements (more to come...)
File:
1 edited

Legend:

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

    r9456 r9893  
    2020#endregion
    2121
    22 using System;
    2322using HeuristicLab.Core.Views;
    2423using HeuristicLab.MainForm;
     
    3433    }
    3534
    36     private ProgressView progressView;
    37     private Progress progress;
    38 
    3935    public ClientView() {
    4036      InitializeComponent();
    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);
    5937    }
    6038
     
    9876
    9977    public void StartProgressView() {
    100       if (InvokeRequired) {
    101         Invoke(new Action(StartProgressView));
    102       } else {
    103         progress.Status = "Downloading client information. Please be patient.";
    104         progress.ProgressState = ProgressState.Started;
    105       }
     78      var message = "Downloading client information. Please be patient.";
     79      MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message);
    10680    }
    10781
    10882    public void FinishProgressView() {
    109       if (InvokeRequired) {
    110         Invoke(new Action(FinishProgressView));
    111       } else {
    112         progress.Finish();
    113       }
     83      MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
    11484    }
    11585  }
Note: See TracChangeset for help on using the changeset viewer.