- Timestamp:
- 04/21/10 06:14:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs
r3423 r3454 88 88 if (Content == null) { 89 89 engineViewHost.Content = null; 90 createUserDefinedAlgorithmButton.Enabled = false;91 90 operatorGraphViewHost.Content = null; 92 91 } else { … … 99 98 operatorGraphViewHost.ViewType = null; 100 99 operatorGraphViewHost.Content = Content.OperatorGraph; 101 createUserDefinedAlgorithmButton.Enabled = true;102 100 } 103 101 SetEnableStateOfControls(); … … 108 106 SetEnableStateOfControls(); 109 107 } 108 protected override void OnLockedChanged() { 109 base.OnLockedChanged(); 110 SetEnableStateOfControls(); 111 } 110 112 private void SetEnableStateOfControls() { 113 engineViewHost.Enabled = Content != null; 111 114 engineViewHost.ReadOnly = ReadOnly; 112 if (Content == null) 113 engineComboBox.Enabled = false; 114 else 115 engineComboBox.Enabled = Content.ExecutionState != ExecutionState.Started; 115 newOperatorGraphButton.Enabled = false; 116 openOperatorGraphButton.Enabled = false; 117 operatorGraphViewHost.Enabled = Content != null; 118 engineComboBox.Enabled = Content != null && !ReadOnly; 119 createUserDefinedAlgorithmButton.Enabled = Content != null && !Locked; 116 120 } 117 121 118 protected override void Content_ExecutionStateChanged(object sender, EventArgs e) {119 if (InvokeRequired)120 Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);121 else {122 createUserDefinedAlgorithmButton.Enabled = Content.ExecutionState != ExecutionState.Started;123 base.Content_ExecutionStateChanged(sender, e);124 }125 }126 122 protected virtual void Content_EngineChanged(object sender, System.EventArgs e) { 127 123 if (InvokeRequired)
Note: See TracChangeset
for help on using the changeset viewer.