- Timestamp:
- 08/22/13 11:31:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBExperimentUploadView.cs
r9893 r9894 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 59 } 63 60 … … 93 90 RunCreationClient.Instance.Refreshing += new EventHandler(RunCreationClient_Refreshing); 94 91 RunCreationClient.Instance.Refreshed += new EventHandler(RunCreationClient_Refreshed); 95 progressView = new ProgressView(this, progress);96 92 } 97 93 … … 99 95 RunCreationClient.Instance.Refreshing -= new EventHandler(RunCreationClient_Refreshing); 100 96 RunCreationClient.Instance.Refreshed -= new EventHandler(RunCreationClient_Refreshed); 101 if (progressView != null) { 102 progressView.Dispose(); 103 progressView = null; 104 } 97 105 98 base.DeregisterContentEvents(); 106 99 } … … 194 187 Invoke(new EventHandler(RunCreationClient_Refreshing), sender, e); 195 188 } else { 196 progress.Status= "Refreshing algorithms and problems...";197 progress.ProgressState = ProgressState.Started;189 var message = "Refreshing algorithms and problems..."; 190 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message); 198 191 } 199 192 } … … 203 196 Invoke(new EventHandler(RunCreationClient_Refreshed), sender, e); 204 197 } else { 205 progress.Finish();198 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 206 199 SetEnabledStateOfControls(); 207 200 } … … 211 204 var task = System.Threading.Tasks.Task.Factory.StartNew(UploadAsync); 212 205 task.ContinueWith((t) => { 213 progress.Finish();206 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 214 207 PluginInfrastructure.ErrorHandling.ShowErrorDialog("An exception occured while uploading the runs to the OKB.", t.Exception); 215 208 }, TaskContinuationOptions.OnlyOnFaulted); … … 217 210 218 211 private void UploadAsync() { 219 progress.Status = "Uploading runs to OKB..."; 220 progress.ProgressValue = 0; 221 progress.ProgressState = ProgressState.Started; 212 var message = "Uploading runs to OKB..."; 213 IProgress progress = MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message); 222 214 double count = dataGridView.Rows.Count; 223 215 int i = 0; … … 234 226 progress.ProgressValue = ((double)i) / count; 235 227 } 236 progress.Finish();228 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this); 237 229 ClearRuns(); 238 230 }
Note: See TracChangeset
for help on using the changeset viewer.