Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/22/11 17:19:17 (12 years ago)
Author:
gkronber
Message:

#1418 improved event propagation in DataAnalysisProblemData and RegressionProblemData

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisProblemData.cs

    r5540 r5542  
    174174    #region changed event propagation
    175175    private void RegisterEventHandlers() {
     176      DatasetParameter.ValueChanged += new EventHandler(DatasetParameter_ValueChanged);
     177      TrainingSamplesStartParameter.ValueChanged += new EventHandler(TrainingSamplesStartParameter_ValueChanged);
     178      TrainingSamplesEndParameter.ValueChanged += new EventHandler(TrainingSamplesEndParameter_ValueChanged);
     179      TestSamplesStartParameter.ValueChanged += new EventHandler(TestSamplesStartParameter_ValueChanged);
     180      TestSamplesEndParameter.ValueChanged += new EventHandler(TestSamplesEndParameter_ValueChanged);
     181
    176182      DatasetParameter.Value.Reset += new EventHandler(DatasetChanged);
    177183      DatasetParameter.Value.ColumnsChanged += new EventHandler(DatasetChanged);
     
    184190      InputVariablesParameter.Value.ItemsReplaced += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<StringValue>>(InputVariables_ItemsReplaced);
    185191
    186       TrainingSamplesStartParameter.ValueChanged += new EventHandler(TrainingSamplesStartParameter_ValueChanged);
    187       TrainingSamplesEndParameter.ValueChanged += new EventHandler(TrainingSamplesEndParameter_ValueChanged);
    188       TestSamplesStartParameter.ValueChanged += new EventHandler(TestSamplesStartParameter_ValueChanged);
    189       TestSamplesEndParameter.ValueChanged += new EventHandler(TestSamplesEndParameter_ValueChanged);
    190 
    191192      TrainingSamplesStartParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
    192193      TrainingSamplesEndParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
     
    195196    }
    196197
     198    private void DatasetParameter_ValueChanged(object sender, EventArgs e) {
     199      DatasetParameter.Value.Reset += new EventHandler(DatasetChanged);
     200      DatasetParameter.Value.ColumnsChanged += new EventHandler(DatasetChanged);
     201      DatasetParameter.Value.RowsChanged += new EventHandler(DatasetChanged);
     202      OnProblemChanged();
     203    }
     204
    197205    private void TestSamplesEndParameter_ValueChanged(object sender, EventArgs e) {
    198206      TestSamplesEndParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
     207      OnProblemChanged();
    199208    }
    200209
    201210    private void TestSamplesStartParameter_ValueChanged(object sender, EventArgs e) {
    202211      TestSamplesStartParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
     212      OnProblemChanged();
    203213    }
    204214
    205215    private void TrainingSamplesEndParameter_ValueChanged(object sender, EventArgs e) {
    206216      TrainingSamplesEndParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
     217      OnProblemChanged();
    207218    }
    208219
    209220    private void TrainingSamplesStartParameter_ValueChanged(object sender, EventArgs e) {
    210221      TrainingSamplesStartParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
     222      OnProblemChanged();
    211223    }
    212224
     
    243255    }
    244256
    245     protected void OnProblemChanged() {
     257    protected virtual void OnProblemChanged() {
    246258      var listeners = Changed;
    247259      if (listeners != null) listeners(this, EventArgs.Empty);
Note: See TracChangeset for help on using the changeset viewer.