- Timestamp:
- 06/28/12 12:00:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.Views/3.3/HiveTasks/OptimizerHiveTaskView.cs
r7582 r8145 32 32 public partial class OptimizerHiveTaskView : HiveTaskView { 33 33 private ProgressView progressView; 34 private IProgress progress; 34 35 35 36 public new OptimizerHiveTask Content { … … 44 45 public OptimizerHiveTaskView() { 45 46 InitializeComponent(); 47 progressView = new ProgressView(this); 46 48 } 47 49 … … 97 99 98 100 private void PauseTaskAsync() { 99 IProgress prog= new Progress();100 prog .Status = "Pausing task. Please be patient for the command to take effect.";101 SetProgressView(prog );101 progress = new Progress(); 102 progress.Status = "Pausing task. Please be patient for the command to take effect."; 103 SetProgressView(progress); 102 104 Content.Pause(); 103 105 FinishProgressView(); … … 105 107 106 108 private void StopTaskAsync() { 107 IProgress prog= new Progress();108 prog .Status = "Stopping task. Please be patient for the command to take effect.";109 SetProgressView(prog );109 progress = new Progress(); 110 progress.Status = "Stopping task. Please be patient for the command to take effect."; 111 SetProgressView(progress); 110 112 Content.Stop(); 111 113 FinishProgressView(); … … 113 115 114 116 private void ResumeTaskAsync() { 115 IProgress prog= new Progress();116 prog .Status = "Resuming task. Please be patient for the command to take effect.";117 SetProgressView(prog );117 progress = new Progress(); 118 progress.Status = "Resuming task. Please be patient for the command to take effect."; 119 SetProgressView(progress); 118 120 Content.Restart(); 119 121 FinishProgressView(); … … 124 126 Invoke(new Action<IProgress>(SetProgressView), progress); 125 127 } else { 126 if (progressView == null) { 127 progressView = new ProgressView(this, progress); 128 } else { 129 progressView.Progress = progress; 130 } 128 progressView.Progress = progress; 131 129 } 132 130 } … … 136 134 Invoke(new Action(FinishProgressView)); 137 135 } else { 138 if (progressView != null) { 139 progressView.Finish(); 140 progressView = null; 141 SetEnabledStateOfControls(); 142 } 136 progress.Finish(); 137 SetEnabledStateOfControls(); 143 138 } 144 139 }
Note: See TracChangeset
for help on using the changeset viewer.