Changeset 3454 for trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.cs
- Timestamp:
- 04/21/10 06:14:03 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.cs
r3376 r3454 60 60 base.RegisterContentEvents(); 61 61 ProgrammableOperator.CodeChanged += ProgrammableOperator_CodeChanged; 62 ProgrammableOperator.DescriptionChanged += ProgrammableOperator_DescriptionChanged;63 62 ProgrammableOperator.SignatureChanged += ProgrammableOperator_SignatureChanged; 64 63 } … … 66 65 protected override void DeregisterContentEvents() { 67 66 ProgrammableOperator.CodeChanged -= ProgrammableOperator_CodeChanged; 68 ProgrammableOperator.DescriptionChanged -= ProgrammableOperator_DescriptionChanged;69 67 ProgrammableOperator.SignatureChanged -= ProgrammableOperator_SignatureChanged; 70 68 base.DeregisterContentEvents(); … … 75 73 if (ProgrammableOperator == null) { 76 74 codeEditor.Text = ""; 77 codeEditor.Enabled = false;78 descriptionTextBox.Text = "";79 descriptionTextBox.Enabled = false;80 75 assembliesTreeView.Nodes.Clear(); 81 76 parameterCollectionView.Content = null; 82 77 } else { 83 codeEditor.Enabled = true;84 descriptionTextBox.Text = ProgrammableOperator.Description;85 descriptionTextBox.Enabled = true;86 78 codeEditor.Prefix = GetGeneratedPrefix(); 87 79 codeEditor.Suffix = @" … … 104 96 parameterCollectionView.Content = ProgrammableOperator.Parameters; 105 97 } 98 SetEnabledStateOfControls(); 99 } 100 101 protected override void OnReadOnlyChanged() { 102 base.OnReadOnlyChanged(); 103 SetEnabledStateOfControls(); 104 } 105 106 private void SetEnabledStateOfControls() { 107 parameterCollectionView.Enabled = Content != null; 108 parameterCollectionView.ReadOnly = ReadOnly; 109 assembliesTreeView.Enabled = Content != null && !ReadOnly; 110 namespacesTreeView.Enabled = Content != null && !ReadOnly; 111 compileButton.Enabled = Content != null && !ReadOnly; 112 codeEditor.Enabled = Content != null && !ReadOnly; 106 113 } 107 114 … … 141 148 private void ProgrammableOperator_CodeChanged(object sender, EventArgs e) { 142 149 codeEditor.Text = ProgrammableOperator.Code; 143 }144 private void ProgrammableOperator_DescriptionChanged(object sender, EventArgs e) {145 descriptionTextBox.Text = ProgrammableOperator.Description;146 150 } 147 151 private void ProgrammableOperator_SignatureChanged(object sender, EventArgs args) { … … 279 283 new CodeViewer(ProgrammableOperator.CompilationUnitCode).ShowDialog(this); 280 284 } 281 282 private void descriptionTextBox_TextChanged(object sender, EventArgs e) {283 ProgrammableOperator.SetDescription(descriptionTextBox.Text);284 }285 286 287 285 } 288 286 }
Note: See TracChangeset
for help on using the changeset viewer.