- Timestamp:
- 11/16/17 10:30:21 (7 years ago)
- Location:
- branches/EnhancedProgress/HeuristicLab.Clients.Hive.JobManager/3.3/Views
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/EnhancedProgress/HeuristicLab.Clients.Hive.JobManager/3.3/Views/HiveResourceSelector.cs
r14185 r15477 68 68 Invoke(new Action(StartProgressView)); 69 69 } else { 70 var message = "Downloading resources. Please be patient."; 71 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, message); 70 Progress.ShowMarquee(this, "Downloading resources. Please be patient."); 72 71 } 73 72 } … … 77 76 Invoke(new Action(FinishProgressView)); 78 77 } else { 79 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);78 Progress.Hide(this); 80 79 } 81 80 } -
branches/EnhancedProgress/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobListView.cs
r14185 r15477 109 109 110 110 task.ContinueWith((t) => { 111 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);111 Progress.Hide(this); 112 112 ErrorHandling.ShowErrorDialog("An error occured while deleting the job. ", t.Exception); 113 113 }, TaskContinuationOptions.OnlyOnFaulted); … … 120 120 121 121 private void DeleteHiveJobsAsync(object items) { 122 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Deleting job...");122 Progress.ShowMarquee(this, "Deleting job..."); 123 123 foreach (RefreshableJob item in (List<RefreshableJob>)items) { 124 124 Content.Remove(item); 125 125 } 126 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);126 Progress.Hide(this); 127 127 } 128 128 -
branches/EnhancedProgress/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r14901 r15477 71 71 Content.Loaded += new EventHandler(Content_Loaded); 72 72 Content.TaskReceived += new EventHandler(Content_TaskReceived); 73 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().Add OperationProgressToView(this, Content.Progress);73 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().AddProgressToView(this, Content.Progress); 74 74 } 75 75 … … 86 86 Content.Loaded -= new EventHandler(Content_Loaded); 87 87 Content.TaskReceived -= new EventHandler(Content_TaskReceived); 88 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().Remove OperationProgressFromView(this, false);88 MainFormManager.GetMainForm<HeuristicLab.MainForm.WindowsForms.MainForm>().RemoveProgressFromView(this, false); 89 89 DeregisterHiveExperimentEvents(); 90 90 DeregisterHiveTasksEvents(); … … 137 137 } 138 138 } 139 } 140 finally { 139 } finally { 141 140 SuppressEvents = false; 142 141 } … … 381 380 382 381 private void PauseJobAsync(object job) { 383 Content.Progress.Start ("Pausing job...");382 Content.Progress.StartMarquee("Pausing job..."); 384 383 HiveClient.PauseJob((RefreshableJob)job); 385 384 Content.Progress.Finish(); … … 387 386 388 387 private void StopJobAsync(object job) { 389 Content.Progress.Start ("Stopping job...");388 Content.Progress.StartMarquee("Stopping job..."); 390 389 HiveClient.StopJob((RefreshableJob)job); 391 390 Content.Progress.Finish(); … … 393 392 394 393 private void ResumeJobAsync(object job) { 395 Content.Progress.Start ("Resuming job...");394 Content.Progress.StartMarquee("Resuming job..."); 396 395 HiveClient.ResumeJob((RefreshableJob)job); 397 396 Content.Progress.Finish(); … … 417 416 try { 418 417 invoker.EndInvoke(ar); 419 } 420 catch (Exception ex) { 421 ThreadPool.QueueUserWorkItem(delegate(object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex); 418 } catch (Exception ex) { 419 ThreadPool.QueueUserWorkItem(delegate (object exception) { ErrorHandling.ShowErrorDialog(this, (Exception)exception); }, ex); 422 420 } 423 421 }, null); … … 506 504 if (subTask is OptimizerHiveTask) { 507 505 OptimizerHiveTask ohTask = subTask as OptimizerHiveTask; 508 ohTask.ExecuteReadActionOnItemTask(new Action(delegate () {506 ohTask.ExecuteReadActionOnItemTask(new Action(delegate () { 509 507 runs.AddRange(ohTask.ItemTask.Item.Runs); 510 508 }));
Note: See TracChangeset
for help on using the changeset viewer.