Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/14 12:30:08 (10 years ago)
Author:
mleitner
Message:

Update correlationmatrix on preprocessing data change - improve performance on datagrid selection.

Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs

    r10930 r10934  
    3636    private bool notOwnEvent = true;
    3737    private bool isSearching = false;
     38    private bool updateOnMouseUp = false;
    3839    private SearchAndReplaceDialog findAndReplaceDialog;
    3940    private IFindPreprocessingItemsIterator searchIterator;
     
    7071      dataGridView.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(dataGridView_CellPainting);
    7172      dataGridView.KeyDown += dataGridView_KeyDown;
     73      dataGridView.MouseUp += dataGridView_MouseUp;
    7274      contextMenuCell.Items.Add(ShowHideColumns);
    7375      _highlightedRowIndices = new List<int>();
     
    7981      if (Content != null) {
    8082        if (!isSearching) {
     83
     84          if (Control.MouseButtons == MouseButtons.Left) {
     85            updateOnMouseUp = true;
     86            return;
     87          }
     88           
    8189          base.dataGridView_SelectionChanged(sender, e);
     90       
    8291          Content.DataGridLogic.SetSelection(GetSelectedCells());
    8392        }
    8493      }
    8594    }
     95
     96    private void dataGridView_MouseUp(object sender, MouseEventArgs e) {
     97      if (!updateOnMouseUp)
     98        return;
     99
     100      updateOnMouseUp = false;
     101      dataGridView_SelectionChanged(sender, e);
     102    }                                     
    86103
    87104    protected override void OnContentChanged() {
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs

    r10922 r10934  
    5454        //var correlationMatrixLogic = new ChartLogic(data);
    5555        var filterLogic = new FilterLogic(data);
    56         var creator = new ProblemDataCreator(Content);
    57         var problemData = (DataAnalysisProblemData)creator.CreateProblemData();
     56       
    5857        //var dataCompletenessLogic = new ChartLogic(data);
    5958
     
    6564          new HistogramContent(chartLogic),
    6665          new ScatterPlotContent(chartLogic),
    67           new CorrelationMatrixContent(problemData),
     66          new CorrelationMatrixContent(Content),
    6867          new DataCompletenessChartContent(dataGridLogic, searchLogic),
    6968         
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs

    r10908 r10934  
    6666    }
    6767
     68
    6869    protected override void RegisterContentEvents() {
    6970      base.RegisterContentEvents();
     71      Content.PreprocessingData.Changed += Data_Changed;
    7072      fcc.ProgressCalculation += new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
    7173      fcc.CorrelationCalculationFinished += new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
     
    7375
    7476    protected override void DeregisterContentEvents() {
     77      Content.PreprocessingData.Changed -= Data_Changed;
    7578      fcc.CorrelationCalculationFinished -= new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
    7679      fcc.ProgressCalculation -= new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
    7780      base.DeregisterContentEvents();
     81    }
     82
     83    private void Data_Changed(object sender, DataPreprocessingChangedEventArgs e) {
     84      OnContentChanged();
    7885    }
    7986
Note: See TracChangeset for help on using the changeset viewer.