Changeset 6598
- Timestamp:
- 07/27/11 13:15:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
r6236 r6598 58 58 variableNamesView.Content.CheckedItemsChanged += new CollectionItemsChangedEventHandler<StringValue>(variableNames_Changed); 59 59 variableNamesView.Content.CollectionReset += new CollectionItemsChangedEventHandler<StringValue>(variableNames_Changed); 60 } 61 60 foreach (var variable in variableNamesView.Content) { 61 variable.ValueChanged += new EventHandler(variable_ValueChanged); 62 } 63 } 64 65 62 66 private void DeregisterVariableNamesViewContentEvents() { 63 67 variableNamesView.Content.ItemsAdded -= new CollectionItemsChangedEventHandler<StringValue>(variableNames_Changed); … … 65 69 variableNamesView.Content.CheckedItemsChanged -= new CollectionItemsChangedEventHandler<StringValue>(variableNames_Changed); 66 70 variableNamesView.Content.CollectionReset -= new CollectionItemsChangedEventHandler<StringValue>(variableNames_Changed); 71 foreach (var variable in variableNamesView.Content) { 72 variable.ValueChanged -= new EventHandler(variable_ValueChanged); 73 } 67 74 } 68 75 … … 93 100 additiveWeightChangeSigmaTextBox.ReadOnly = ReadOnly; 94 101 multiplicativeWeightChangeSigmaTextBox.Enabled = Content != null; 95 multiplicativeWeightChangeSigmaTextBox.ReadOnly = ReadOnly; 102 multiplicativeWeightChangeSigmaTextBox.ReadOnly = ReadOnly; 96 103 } 97 104 … … 104 111 #region control event handlers 105 112 private void variableNames_Changed(object sender, CollectionItemsChangedEventArgs<StringValue> args) { 113 if (args.Items != null) 114 foreach (var newVar in args.Items) 115 newVar.ValueChanged += new EventHandler(variable_ValueChanged); 116 if (args.OldItems != null) 117 foreach (var oldVar in args.OldItems) 118 oldVar.ValueChanged -= new EventHandler(variable_ValueChanged); 119 UpdateContent(); 120 } 121 122 void variable_ValueChanged(object sender, EventArgs e) { 123 UpdateContent(); 124 } 125 126 private void UpdateContent() { 106 127 if (Content != null) { 107 128 Content.Changed -= new EventHandler(Content_Changed); … … 110 131 } 111 132 } 133 112 134 113 135 private void weightMuTextBox_TextChanged(object sender, EventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.