- Timestamp:
- 07/22/10 04:27:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
r4068 r4070 70 70 Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged); 71 71 Content.Prepared -= new EventHandler(Content_Prepared); 72 Content.Started -= new EventHandler(Content_Started); 73 Content.Paused -= new EventHandler(Content_Paused); 74 Content.Stopped -= new EventHandler(Content_Stopped); 72 75 Content.ProblemChanged -= new EventHandler(Content_ProblemChanged); 73 76 base.DeregisterContentEvents(); … … 79 82 Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged); 80 83 Content.Prepared += new EventHandler(Content_Prepared); 84 Content.Started += new EventHandler(Content_Started); 85 Content.Paused += new EventHandler(Content_Paused); 86 Content.Stopped += new EventHandler(Content_Stopped); 81 87 Content.ProblemChanged += new EventHandler(Content_ProblemChanged); 82 88 } … … 126 132 } 127 133 } 134 protected virtual void Content_ExecutionStateChanged(object sender, EventArgs e) { 135 if (InvokeRequired) 136 Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e); 137 else 138 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false; 139 } 128 140 protected virtual void Content_Prepared(object sender, EventArgs e) { 129 141 if (InvokeRequired) 130 142 Invoke(new EventHandler(Content_Prepared), sender, e); 131 else 143 else { 132 144 resultsView.Content = Content.Results.AsReadOnly(); 133 } 134 protected virtual void Content_ExecutionStateChanged(object sender, EventArgs e) { 135 if (InvokeRequired) 136 Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e); 137 else { 138 ReadOnly = Content.ExecutionState == ExecutionState.Started; 139 Locked = Content.ExecutionState == ExecutionState.Started; 145 ReadOnly = Locked = false; 146 SetEnabledStateOfExecutableButtons(); 147 } 148 } 149 protected virtual void Content_Started(object sender, EventArgs e) { 150 if (InvokeRequired) 151 Invoke(new EventHandler(Content_Started), sender, e); 152 else { 153 ReadOnly = Locked = true; 154 SetEnabledStateOfExecutableButtons(); 155 } 156 } 157 protected virtual void Content_Paused(object sender, EventArgs e) { 158 if (InvokeRequired) 159 Invoke(new EventHandler(Content_Paused), sender, e); 160 else { 161 ReadOnly = Locked = false; 162 SetEnabledStateOfExecutableButtons(); 163 } 164 } 165 protected virtual void Content_Stopped(object sender, EventArgs e) { 166 if (InvokeRequired) 167 Invoke(new EventHandler(Content_Stopped), sender, e); 168 else { 169 ReadOnly = Locked = false; 140 170 SetEnabledStateOfExecutableButtons(); 141 171 }
Note: See TracChangeset
for help on using the changeset viewer.