Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/14 10:49:15 (10 years ago)
Author:
rstoll
Message:
  • SelectionEvent added
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3
Files:
3 edited

Legend:

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

    r10785 r10804  
    8282      _highlightedCellsBackground = new Dictionary<int, IList<int>>();
    8383      currentCell = null;
     84      DataGridView.SelectionChanged += DataGridView_SelectionChanged;
     85    }
     86
     87    void DataGridView_SelectionChanged(object sender, EventArgs e) {
     88      Content.DataGridLogic.SetSelection(GetSelectedCells());
    8489    }
    8590
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs

    r10803 r10804  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Drawing;
    2524using System.Windows.Forms;
    2625using HeuristicLab.Analysis;
     
    6463        if (VariableIsDisplayed(variableName)) {
    6564          dataTable.Rows.Remove(variableName);
    66           dataTablePerVariable.Remove(dataTablePerVariable.Find( x => (x.Name == variableName)));
     65          dataTablePerVariable.Remove(dataTablePerVariable.Find(x => (x.Name == variableName)));
    6766        } else {
    6867          DataRow row = GetDataRow(variableName);
     
    9190      base.RegisterContentEvents();
    9291      Content.ChartLogic.Changed += PreprocessingData_Changed;
    93      
     92
    9493    }
    9594
     
    112111      dataTable = new PreprocessingDataTable(chartTitle);
    113112      dataTable.Rows.AddRange(dataRows);
    114      
     113
    115114
    116115      // init data table per variable
    117116      dataTablePerVariable = new List<PreprocessingDataTable>();
    118       foreach(var checkedItem in variableItemList.CheckedItems) {
     117      foreach (var checkedItem in variableItemList.CheckedItems) {
    119118        string variableName = variableItemList[checkedItem.Index].Value;
    120119        PreprocessingDataTable d = new PreprocessingDataTable(variableName);
     
    123122        //rowSelect.Name = variableName + "(Selected)";
    124123        //rowSelect.VisualProperties.Color = Color.Green;
    125        
     124
    126125        d.Rows.Add(row);
    127126        //d.SelectedRows.Add(rowSelect);
    128        
     127
    129128        dataTablePerVariable.Add(d);
    130129
     
    144143      if (Content != null) {
    145144        logic = Content.ChartLogic;
    146         InitData();       
     145        InitData();
    147146        variableItemList.CheckedItemsChanged += CheckedItemsChanged;
    148         GenerateChart();               
     147        GenerateChart();
    149148      }
    150149    }
     
    167166        case DataPreprocessingChangedEventType.Any:
    168167          InitData();
    169           GenerateChart();         
     168          GenerateChart();
    170169          break;
    171170      }
     
    217216    protected void GenerateChart() {
    218217
    219       ClearTableLayout(); 
     218      ClearTableLayout();
    220219
    221220      if (allInOneMode) {
     
    234233      tableLayoutPanel.AutoScroll = false;
    235234      tableLayoutPanel.AutoScroll = true;
    236     }   
     235    }
    237236
    238237    private void GenerateSingleChartLayout() {
     
    247246    private void GenerateMultiChartLayout() {
    248247      int checkedItemsCnt = 0;
    249       foreach(var item in variableItemList.CheckedItems)
     248      foreach (var item in variableItemList.CheckedItems)
    250249        checkedItemsCnt++;
    251250
     
    262261
    263262      if (columns == 3)
    264         rows = (checkedItemsCnt+2) / columns;
    265       else if(columns == 2)
     263        rows = (checkedItemsCnt + 2) / columns;
     264      else if (columns == 2)
    266265        rows = (checkedItemsCnt + 1) / columns;
    267266      else
     
    274273      List<PreprocessingDataTable>.Enumerator enumerator = dataTablePerVariable.GetEnumerator();
    275274      for (int x = 0; x < columns; x++) {
    276        
    277         if(rows <= 3)
     275
     276        if (rows <= 3)
    278277          tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100 / columns));
    279278        else
     
    298297            p.Dock = DockStyle.Fill;
    299298            tableLayoutPanel.Controls.Add(p, y, x);
    300           }
    301           else {
     299          } else {
    302300            dataView.Content = d;
    303301            dataView.Dock = DockStyle.Fill;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs

    r10803 r10804  
    2020#endregion
    2121
    22 using HeuristicLab.Collections;
    23 using HeuristicLab.Core.Views;
    24 using HeuristicLab.MainForm;
    2522using System;
    2623using System.Collections.Generic;
     
    2926using System.Windows.Forms;
    3027using System.Windows.Forms.DataVisualization.Charting;
     28using HeuristicLab.Collections;
     29using HeuristicLab.Core.Views;
    3130using HeuristicLab.DataPreprocessing.Implementations;
     31using HeuristicLab.MainForm;
    3232
    3333namespace HeuristicLab.Analysis.Views {
     
    172172      else series.Color = Color.Empty;
    173173      series.IsVisibleInLegend = row.VisualProperties.IsVisibleInLegend;
    174      
     174
    175175      switch (row.VisualProperties.ChartType) {
    176176        case DataRowVisualProperties.DataRowChartType.Line:
     
    535535
    536536    // get minimum ignores nan values
    537     private double GetMinimum(IEnumerable<double> values)
    538     {
     537    private double GetMinimum(IEnumerable<double> values) {
    539538      double min = Double.MaxValue;
    540539
    541540      foreach (double value in values) {
    542541        if (!Double.IsNaN(value) && value < min)
    543           min = value;     
     542          min = value;
    544543      }
    545544      return min;
Note: See TracChangeset for help on using the changeset viewer.