Changeset 6618 for branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols
- Timestamp:
- 08/01/11 17:48:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
r6415 r6618 58 58 variableNamesView.Content.CheckedItemsChanged += new CollectionItemsChangedEventHandler<StringValue>(variableNames_Changed); 59 59 variableNamesView.Content.CollectionReset += new CollectionItemsChangedEventHandler<StringValue>(variableNames_Changed); 60 } 60 foreach (var variable in variableNamesView.Content) { 61 variable.ValueChanged += new EventHandler(variable_ValueChanged); 62 } 63 } 64 61 65 62 66 private void DeregisterVariableNamesViewContentEvents() { … … 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 … … 103 110 #region control event handlers 104 111 private void variableNames_Changed(object sender, CollectionItemsChangedEventArgs<StringValue> args) { 112 if (args.Items != null) 113 foreach (var newVar in args.Items) 114 newVar.ValueChanged += new EventHandler(variable_ValueChanged); 115 if (args.OldItems != null) 116 foreach (var oldVar in args.OldItems) 117 oldVar.ValueChanged -= new EventHandler(variable_ValueChanged); 118 UpdateContent(); 119 } 120 121 private void variable_ValueChanged(object sender, EventArgs e) { 122 UpdateContent(); 123 } 124 125 private void UpdateContent() { 105 126 if (Content != null) { 106 127 DeregisterContentEvents(); … … 109 130 } 110 131 } 132 111 133 112 134 private void weightMuTextBox_TextChanged(object sender, EventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.