Changeset 9933 for stable/HeuristicLab.Clients.OKB.Views/3.3/RunCreation
- Timestamp:
- 09/03/13 15:55:36 (11 years ago)
- Location:
- stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 9849,9851,9865,9867-9868,9893-9896,9900-9901,9905,9907
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBExperimentUploadView.cs
r9456 r9933 54 54 Algorithm selectedAlgorithm = null; 55 55 Problem selectedProblem = null; 56 private ProgressView progressView;57 private Progress progress;58 56 59 57 public OKBExperimentUploadView() { 60 58 InitializeComponent(); 61 progress = new Progress() {62 CanBeCanceled = false,63 ProgressState = ProgressState.Finished64 };65 59 } 66 60 … … 96 90 RunCreationClient.Instance.Refreshing += new EventHandler(RunCreationClient_Refreshing); 97 91 RunCreationClient.Instance.Refreshed += new EventHandler(RunCreationClient_Refreshed); 98 progressView = new ProgressView(this, progress);99 92 } 100 93 … … 102 95 RunCreationClient.Instance.Refreshing -= new EventHandler(RunCreationClient_Refreshing); 103 96 RunCreationClient.Instance.Refreshed -= new EventHandler(RunCreationClient_Refreshed); 104 if (progressView != null) { 105 progressView.Content = null; 106 progressView.Dispose(); 107 progressView = null; 108 } 97 109 98 base.DeregisterContentEvents(); 110 99 } … … 198 187 Invoke(new EventHandler(RunCreationClient_Refreshing), sender, e); 199 188 } 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); 202 191 } 203 192 } … … 207 196 Invoke(new EventHandler(RunCreationClient_Refreshed), sender, e); 208 197 } else { 209 progress.Finish();198 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 210 199 SetEnabledStateOfControls(); 211 200 } … … 215 204 var task = System.Threading.Tasks.Task.Factory.StartNew(UploadAsync); 216 205 task.ContinueWith((t) => { 217 progress.Finish();206 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 218 207 PluginInfrastructure.ErrorHandling.ShowErrorDialog("An exception occured while uploading the runs to the OKB.", t.Exception); 219 208 }, TaskContinuationOptions.OnlyOnFaulted); … … 221 210 222 211 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); 226 214 double count = dataGridView.Rows.Count; 227 215 int i = 0; … … 238 226 progress.ProgressValue = ((double)i) / count; 239 227 } 240 progress.Finish();228 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 241 229 ClearRuns(); 242 230 }
Note: See TracChangeset
for help on using the changeset viewer.