Changeset 5667 for branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.cs
- Timestamp:
- 03/12/11 13:14:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/Views/OKBProblemView.cs
r5660 r5667 30 30 [View("OKBProblem View")] 31 31 [Content(typeof(OKBProblem), true)] 32 public partial class OKBProblemView : NamedItemView {32 public sealed partial class OKBProblemView : NamedItemView { 33 33 public new OKBProblem Content { 34 34 get { return (OKBProblem)base.Content; } … … 70 70 base.SetEnabledStateOfControls(); 71 71 problemComboBox.Enabled = (Content != null) && !ReadOnly && !Locked && (problemComboBox.Items.Count > 0); 72 cloneProblemButton.Enabled = (Content != null) && (Content.Problem != null) && !ReadOnly && !Locked;72 cloneProblemButton.Enabled = (Content != null) && (Content.ProblemId != -1) && !ReadOnly && !Locked; 73 73 refreshButton.Enabled = (Content != null) && !ReadOnly && !Locked; 74 74 parameterCollectionView.Enabled = Content != null; … … 86 86 } else { 87 87 Cursor = Cursors.AppStarting; 88 problemComboBox.Enabled = refreshButton.Enabled = false;88 problemComboBox.Enabled = cloneProblemButton.Enabled = refreshButton.Enabled = parameterCollectionView.Enabled = false; 89 89 } 90 90 } … … 103 103 if (InvokeRequired) 104 104 Invoke(new EventHandler(Content_ProblemChanged), sender, e); 105 else { 106 problemComboBox.SelectedItem = RunCreationClient.Instance.Problems.FirstOrDefault(x => x.Id == Content.ProblemId); 107 } 105 else 106 OnContentChanged(); 108 107 } 109 108 #endregion … … 111 110 #region Control Events 112 111 private void cloneProblemButton_Click(object sender, EventArgs e) { 113 MainFormManager.MainForm.ShowContent( (IContent)Content.Problem.Clone());112 MainFormManager.MainForm.ShowContent(Content.CloneProblem()); 114 113 } 115 114 private void refreshButton_Click(object sender, System.EventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.