Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/03/13 15:55:36 (11 years ago)
Author:
ascheibe
Message:

#1042 merged r9849, r9851, r9865, r9867, r9868, r9893, r9894, r9895, r9896, r9900, r9901, r9905, r9907 into stable branch

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBExperimentUploadView.cs

    r9456 r9933  
    5454    Algorithm selectedAlgorithm = null;
    5555    Problem selectedProblem = null;
    56     private ProgressView progressView;
    57     private Progress progress;
    5856
    5957    public OKBExperimentUploadView() {
    6058      InitializeComponent();
    61       progress = new Progress() {
    62         CanBeCanceled = false,
    63         ProgressState = ProgressState.Finished
    64       };
    6559    }
    6660
     
    9690      RunCreationClient.Instance.Refreshing += new EventHandler(RunCreationClient_Refreshing);
    9791      RunCreationClient.Instance.Refreshed += new EventHandler(RunCreationClient_Refreshed);
    98       progressView = new ProgressView(this, progress);
    9992    }
    10093
     
    10295      RunCreationClient.Instance.Refreshing -= new EventHandler(RunCreationClient_Refreshing);
    10396      RunCreationClient.Instance.Refreshed -= new EventHandler(RunCreationClient_Refreshed);
    104       if (progressView != null) {
    105         progressView.Content = null;
    106         progressView.Dispose();
    107         progressView = null;
    108       }
     97
    10998      base.DeregisterContentEvents();
    11099    }
     
    198187        Invoke(new EventHandler(RunCreationClient_Refreshing), sender, e);
    199188      } else {
    200         progress.Status = "Refreshing algorithms and problems...";
    201         progress.ProgressState = ProgressState.Started;
     189        var message = "Refreshing algorithms and problems...";
     190        MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message);
    202191      }
    203192    }
     
    207196        Invoke(new EventHandler(RunCreationClient_Refreshed), sender, e);
    208197      } else {
    209         progress.Finish();
     198        MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
    210199        SetEnabledStateOfControls();
    211200      }
     
    215204      var task = System.Threading.Tasks.Task.Factory.StartNew(UploadAsync);
    216205      task.ContinueWith((t) => {
    217         progress.Finish();
     206        MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
    218207        PluginInfrastructure.ErrorHandling.ShowErrorDialog("An exception occured while uploading the runs to the OKB.", t.Exception);
    219208      }, TaskContinuationOptions.OnlyOnFaulted);
     
    221210
    222211    private void UploadAsync() {
    223       progress.Status = "Uploading runs to OKB...";
    224       progress.ProgressValue = 0;
    225       progress.ProgressState = ProgressState.Started;
     212      var message = "Uploading runs to OKB...";
     213      IProgress progress = MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message);
    226214      double count = dataGridView.Rows.Count;
    227215      int i = 0;
     
    238226        progress.ProgressValue = ((double)i) / count;
    239227      }
    240       progress.Finish();
     228      MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
    241229      ClearRuns();
    242230    }
Note: See TracChangeset for help on using the changeset viewer.