Changeset 17062 for stable/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBExperimentUploadView.cs
- Timestamp:
- 07/04/19 14:45:47 (5 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.OKB.Views
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Clients.OKB.Views merged: 16356,16389,16430
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/Views/OKBExperimentUploadView.cs
r15584 r17062 188 188 if (InvokeRequired) { Invoke((Action<object, EventArgs>)RunCreationClient_Refreshing, sender, e); return; } 189 189 var message = "Refreshing algorithms and problems..."; 190 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message);190 Progress.Show(this, message, ProgressMode.Indeterminate); 191 191 refreshing = true; 192 192 SetEnabledStateOfControls(); … … 195 195 private void RunCreationClient_Refreshed(object sender, EventArgs e) { 196 196 if (InvokeRequired) { Invoke((Action<object, EventArgs>)RunCreationClient_Refreshed, sender, e); return; } 197 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);197 Progress.Hide(this); 198 198 refreshing = false; 199 199 SetEnabledStateOfControls(); … … 203 203 var task = System.Threading.Tasks.Task.Factory.StartNew(UploadAsync); 204 204 task.ContinueWith((t) => { 205 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);205 Progress.Hide(this); 206 206 PluginInfrastructure.ErrorHandling.ShowErrorDialog("An exception occured while uploading the runs to the OKB.", t.Exception); 207 207 }, TaskContinuationOptions.OnlyOnFaulted); … … 210 210 private void UploadAsync() { 211 211 var message = "Uploading runs to OKB..."; 212 IProgress progress = MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message);212 IProgress progress = Progress.Show(this, message); 213 213 double count = dataGridView.Rows.Count; 214 214 int i = 0; … … 226 226 progress.ProgressValue = ((double)i) / count; 227 227 } 228 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);228 Progress.Hide(this); 229 229 ClearRuns(); 230 230 }
Note: See TracChangeset
for help on using the changeset viewer.