Changeset 5779 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.cs
- Timestamp:
- 03/21/11 15:05:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.cs
r5718 r5779 107 107 if (Content != null && Content.Job != null) { 108 108 this.jobIdTextBox.Text = Content.Job.Id.ToString(); 109 this.dateCreatedTextBox.Text = Content.Job.DateCreated.HasValue ? Content.Job.DateCreated.ToString() : "-";109 this.dateCreatedTextBox.Text = Content.Job.DateCreated.HasValue ? Content.Job.DateCreated.ToString() : string.Empty; 110 110 this.priorityTextBox.Text = Content.Job.Priority.ToString(); 111 111 this.coresNeededTextBox.Text = Content.Job.CoresNeeded.ToString(); … … 129 129 this.executionTimeTextBox.Text = Content.Job.ExecutionTime.ToString(); 130 130 this.dateFinishedTextBox.Text = Content.Job.DateFinished.ToString(); 131 this.exceptionTextBox.Text = Content.Job.CurrentStateLog .Exception;131 this.exceptionTextBox.Text = Content.Job.CurrentStateLog != null ? Content.Job.CurrentStateLog.Exception : string.Empty; 132 132 if (Content.OptimizerJob.ComputeInParallel) { 133 133 this.stateLogViewHost.Content = new StateLogListList( … … 145 145 this.stateLogViewHost.Content = null; 146 146 } 147 SetEnabledStateOfControls(); 147 148 } 148 149 } … … 163 164 this.computeInParallelCheckBox.Enabled = !this.ReadOnly && this.Content != null && this.Content.OptimizerJob != null && this.Content.OptimizerJob.IsParallelizable; 164 165 166 this.restartButton.Enabled = Content != null && Content.Job.State == JobState.Paused; 167 this.pauseButton.Enabled = Content != null && Content.Job.State == JobState.Calculating; 168 this.stopButton.Enabled = Content != null && (Content.Job.State == JobState.Calculating || Content.Job.State == JobState.Waiting || Content.Job.State == JobState.Paused); 169 165 170 optimizerNamedItemView.ReadOnly = true; 166 171 } … … 180 185 } 181 186 } 187 188 private void exceptionTextBox_DoubleClick(object sender, EventArgs e) { 189 using (TextDialog dialog = new TextDialog("Exception", exceptionTextBox.Text, ReadOnly || !Content.CanChangeDescription)) { 190 if (dialog.ShowDialog(this) == DialogResult.OK) 191 Content.Description = dialog.Content; 192 } 193 } 194 195 private void restartButton_Click(object sender, EventArgs e) { 196 Content.Restart(); 197 } 198 199 private void pauseButton_Click(object sender, EventArgs e) { 200 Content.Pause(); 201 } 202 203 private void stopButton_Click(object sender, EventArgs e) { 204 Content.Stop(); 205 } 182 206 } 183 207 }
Note: See TracChangeset
for help on using the changeset viewer.