- Timestamp:
- 05/24/11 16:55:48 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.cs
r6200 r6267 150 150 } 151 151 152 protected virtual void OptimizerJob_ComputeInParallelChanged(object sender, EventArgs e) { 153 if (InvokeRequired) { 154 Invoke(new EventHandler(OptimizerJob_ComputeInParallelChanged), sender, e); 155 } else { 156 computeInParallelCheckBox.Checked = Content.ItemJob.ComputeInParallel; 157 } 158 } 159 #endregion 160 161 #region Child Control Events 162 protected virtual void computeInParallelCheckBox_CheckedChanged(object sender, EventArgs e) { 163 if (Content != null && Content.ItemJob != null) { 164 this.Content.ItemJob.ComputeInParallel = this.computeInParallelCheckBox.Checked; 165 } 166 } 167 168 protected virtual void exceptionTextBox_DoubleClick(object sender, EventArgs e) { 169 using (TextDialog dialog = new TextDialog("Exception", exceptionTextBox.Text, ReadOnly || !Content.CanChangeDescription)) { 170 if (dialog.ShowDialog(this) == DialogResult.OK) 171 Content.Description = dialog.Content; 172 } 173 } 174 175 protected virtual void modifyItemButton_Click(object sender, EventArgs e) { 176 MainFormManager.MainForm.ShowContent(Content.ItemJob.Item); 177 } 178 #endregion 179 152 180 protected override void SetEnabledStateOfControls() { 153 181 base.SetEnabledStateOfControls(); … … 171 199 optimizerItemView.ReadOnly = true; 172 200 } 173 174 protected virtual void OptimizerJob_ComputeInParallelChanged(object sender, EventArgs e) {175 if (InvokeRequired) {176 Invoke(new EventHandler(OptimizerJob_ComputeInParallelChanged), sender, e);177 } else {178 computeInParallelCheckBox.Checked = Content.ItemJob.ComputeInParallel;179 }180 }181 #endregion182 183 #region Child Control Events184 protected virtual void computeInParallelCheckBox_CheckedChanged(object sender, EventArgs e) {185 if (Content != null && Content.ItemJob != null) {186 this.Content.ItemJob.ComputeInParallel = this.computeInParallelCheckBox.Checked;187 }188 }189 190 protected virtual void exceptionTextBox_DoubleClick(object sender, EventArgs e) {191 using (TextDialog dialog = new TextDialog("Exception", exceptionTextBox.Text, ReadOnly || !Content.CanChangeDescription)) {192 if (dialog.ShowDialog(this) == DialogResult.OK)193 Content.Description = dialog.Content;194 }195 }196 197 protected virtual void modifyItemButton_Click(object sender, EventArgs e) {198 MainFormManager.MainForm.ShowContent(Content.ItemJob.Item);199 }200 #endregion201 201 } 202 202 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/OptimizerHiveJobView.cs
r6178 r6267 50 50 } 51 51 #region Content Events 52 53 protected override void SetEnabledStateOfControls() {54 base.SetEnabledStateOfControls();55 56 this.restartButton.Enabled = Content != null && !Content.Job.Command.HasValue && Content.Job.State == JobState.Paused;57 this.pauseButton.Enabled = Content != null && !Content.Job.Command.HasValue && Content.Job.State == JobState.Calculating;58 this.stopButton.Enabled = Content != null && !Content.Job.Command.HasValue && (Content.Job.State == JobState.Calculating || Content.Job.State == JobState.Waiting || Content.Job.State == JobState.Paused);59 }60 52 #endregion 61 53 … … 73 65 } 74 66 #endregion 67 68 protected override void SetEnabledStateOfControls() { 69 base.SetEnabledStateOfControls(); 70 71 this.restartButton.Enabled = Content != null && !Content.Job.Command.HasValue && (Content.Job.State == JobState.Paused || Content.Job.State == JobState.Failed || Content.Job.State == JobState.Aborted); 72 this.pauseButton.Enabled = Content != null && !Content.Job.Command.HasValue && Content.Job.State == JobState.Calculating; 73 this.stopButton.Enabled = Content != null && !Content.Job.Command.HasValue && (Content.Job.State == JobState.Calculating || Content.Job.State == JobState.Waiting || Content.Job.State == JobState.Paused); 74 } 75 75 } 76 76 }
Note: See TracChangeset
for help on using the changeset viewer.