Changeset 2998
- Timestamp:
- 03/11/10 02:48:42 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.SGA.Views/3.3/SGAView.cs
r2917 r2998 49 49 Content = content; 50 50 } 51 52 protected override void DeregisterContentEvents() {53 // deregister events here54 base.DeregisterContentEvents();55 }56 protected override void RegisterContentEvents() {57 base.RegisterContentEvents();58 // register events here59 }60 61 protected override void OnContentChanged() {62 base.OnContentChanged();63 if (Content == null) {64 } else {65 }66 }67 51 } 68 52 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
r2961 r2998 127 127 Invoke(new EventHandler(Content_Prepared), sender, e); 128 128 else { 129 parameterCollectionView.Enabled = true;130 newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = true;131 problemViewHost.Enabled = true;132 129 resultsView.Content = Content.Results; 133 resultsView.Enabled = true;134 130 startButton.Enabled = !Content.Finished; 135 stopButton.Enabled = false; 136 resetButton.Enabled = true; 137 UpdateExecutionTimeTextBox(); 138 } 139 } 140 protected void Content_ProblemChanged(object sender, EventArgs e) { 131 UpdateExecutionTimeTextBox(); 132 } 133 } 134 protected virtual void Content_ProblemChanged(object sender, EventArgs e) { 141 135 if (InvokeRequired) 142 136 Invoke(new EventHandler(Content_ProblemChanged), sender, e); … … 194 188 195 189 #region Button events 196 protected v oid newProblemButton_Click(object sender, EventArgs e) {190 protected virtual void newProblemButton_Click(object sender, EventArgs e) { 197 191 if (problemTypeSelectorDialog == null) { 198 192 problemTypeSelectorDialog = new TypeSelectorDialog(); … … 204 198 } 205 199 } 206 protected v oid openProblemButton_Click(object sender, EventArgs e) {200 protected virtual void openProblemButton_Click(object sender, EventArgs e) { 207 201 openFileDialog.Title = "Open Problem"; 208 202 if (openFileDialog.ShowDialog(this) == DialogResult.OK) { … … 231 225 } 232 226 } 233 protected v oid saveProblemButton_Click(object sender, EventArgs e) {227 protected virtual void saveProblemButton_Click(object sender, EventArgs e) { 234 228 saveFileDialog.Title = "Save Problem"; 235 229 if (saveFileDialog.ShowDialog(this) == DialogResult.OK) { -
trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs
r2949 r2998 87 87 88 88 if (Content == null) { 89 engineComboBox.Enabled = false;90 89 engineViewHost.Content = null; 91 engineViewHost.Enabled = false;90 createUserDefinedAlgorithmButton.Enabled = false; 92 91 } else { 93 engineComboBox.Enabled = true;94 92 if (Content.Engine == null) 95 93 engineComboBox.SelectedIndex = engineTypes.IndexOf(null); 96 94 else 97 95 engineComboBox.SelectedIndex = engineTypes.IndexOf(Content.Engine.GetType()); 98 engineViewHost.Enabled = true;99 96 engineViewHost.ViewType = null; 100 97 engineViewHost.Content = Content.Engine; 98 createUserDefinedAlgorithmButton.Enabled = true; 101 99 } 102 100 } 103 101 104 protected void Content_EngineChanged(object sender, System.EventArgs e) { 102 protected override void Content_Started(object sender, EventArgs e) { 103 if (InvokeRequired) 104 Invoke(new EventHandler(Content_Started), sender, e); 105 else { 106 createUserDefinedAlgorithmButton.Enabled = false; 107 engineComboBox.Enabled = false; 108 engineViewHost.Enabled = false; 109 base.Content_Started(sender, e); 110 } 111 } 112 protected override void Content_Stopped(object sender, EventArgs e) { 113 if (InvokeRequired) 114 Invoke(new EventHandler(Content_Stopped), sender, e); 115 else { 116 createUserDefinedAlgorithmButton.Enabled = true; 117 engineComboBox.Enabled = true; 118 engineViewHost.Enabled = true; 119 base.Content_Stopped(sender, e); 120 } 121 } 122 protected virtual void Content_EngineChanged(object sender, System.EventArgs e) { 105 123 if (InvokeRequired) 106 124 Invoke(new EventHandler(Content_EngineChanged), sender, e); … … 115 133 } 116 134 117 protected v oid engineComboBox_SelectedIndexChanged(object sender, EventArgs e) {135 protected virtual void engineComboBox_SelectedIndexChanged(object sender, EventArgs e) { 118 136 if (Content != null) { 119 137 Type t = engineTypes[engineComboBox.SelectedIndex]; … … 125 143 } 126 144 127 protected v oid createUserDefinedAlgorithmButton_Click(object sender, EventArgs e) {145 protected virtual void createUserDefinedAlgorithmButton_Click(object sender, EventArgs e) { 128 146 MainFormManager.CreateDefaultView(Content.CreateUserDefinedAlgorithm()).Show(); 129 147 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs
r2954 r2998 75 75 } 76 76 77 protected override void Content_Started(object sender, EventArgs e) { 78 if (InvokeRequired) 79 Invoke(new EventHandler(Content_Started), sender, e); 80 else { 81 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = false; 82 operatorGraphViewHost.Enabled = false; 83 globalScopeView.Enabled = false; 84 base.Content_Started(sender, e); 85 } 86 } 87 protected override void Content_Stopped(object sender, EventArgs e) { 88 if (InvokeRequired) 89 Invoke(new EventHandler(Content_Stopped), sender, e); 90 else { 91 newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = true; 92 operatorGraphViewHost.Enabled = true; 93 globalScopeView.Enabled = true; 94 base.Content_Stopped(sender, e); 95 } 96 } 77 97 private void Content_OperatorGraphChanged(object sender, EventArgs e) { 78 98 if (InvokeRequired) -
trunk/sources/HeuristicLab.Problems.TSP.Views/3.3/TSPView.cs
r2917 r2998 53 53 } 54 54 55 protected override void OnContentChanged() { 56 base.OnContentChanged(); 57 if (Content == null) { 58 importButton.Enabled = false; 59 } else { 60 importButton.Enabled = true; 61 } 62 } 63 55 64 private void importButton_Click(object sender, System.EventArgs e) { 56 65 if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
Note: See TracChangeset
for help on using the changeset viewer.