Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10370 for branches


Ignore:
Timestamp:
01/22/14 14:38:34 (11 years ago)
Author:
rstoll
Message:

Removed DataGridLogic from StatisticsView

Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj

    r10369 r10370  
    219219    </ProjectReference>
    220220  </ItemGroup>
    221   <ItemGroup>
    222     <EmbeddedResource Include="Views\StatisticsView.resx">
    223       <DependentUpon>StatisticsView.cs</DependentUpon>
    224     </EmbeddedResource>
    225   </ItemGroup>
    226221  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    227222  <PropertyGroup>
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticsContent.cs

    r10367 r10370  
    1 using HeuristicLab.Common;
     1using System.Drawing;
     2using HeuristicLab.Common;
    23using HeuristicLab.Core;
    3 using System.Drawing;
    4 using System;
    5 using System.Collections.Generic;
    6 using System.Linq;
    7 using System.Text;
    84
    9 namespace HeuristicLab.DataPreprocessing
    10 {
     5namespace HeuristicLab.DataPreprocessing {
    116  [Item("Statistics", "Represents the statistics grid.")]
    12   public class StatisticsContent : Item
    13   {
     7  public class StatisticsContent : Item {
    148
    159    private readonly IStatisticsLogic statisticsLogic;
    16     private readonly IDataGridLogic dataGridLogic;
    17     public StatisticsContent(IStatisticsLogic theStatisticsLogic, IDataGridLogic theDataGridLogic)
    18     {
     10    public StatisticsContent(IStatisticsLogic theStatisticsLogic) {
    1911      statisticsLogic = theStatisticsLogic;
    20       dataGridLogic = theDataGridLogic;
    2112    }
    2213
    2314    public StatisticsContent(StatisticsContent content, Cloner cloner)
    24       : base(content, cloner)
    25     {
     15      : base(content, cloner) {
    2616
    2717    }
    2818
    29     public IStatisticsLogic StatisticsLogic
    30     {
     19    public IStatisticsLogic StatisticsLogic {
    3120      get { return statisticsLogic; }
    3221    }
    3322
    34     public IDataGridLogic DataDridLogic {
    35       get { return dataGridLogic; }
    36     }
    37 
    38     public static new Image StaticItemImage
    39     {
     23    public static new Image StaticItemImage {
    4024      get { return HeuristicLab.Common.Resources.VSImageLibrary.Statistics; }
    4125    }
    4226
    43     public override IDeepCloneable Clone(Cloner cloner)
    44     {
     27    public override IDeepCloneable Clone(Cloner cloner) {
    4528      return new StatisticsContent(this, cloner);
    4629    }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/StatisticsView.cs

    r10369 r10370  
    3838    }
    3939    private void UpdateData() {
    40       var statisticsLogic = Content.StatisticsLogic;
    41       var dataGridLogic = Content.DataDridLogic;
    42       txtRows.Text = statisticsLogic.GetRowCount().ToString();
    43       txtColumns.Text = statisticsLogic.GetColumnCount().ToString();
    44       txtNumericColumns.Text = statisticsLogic.GetNumericColumnCount().ToString();
    45       txtNominalColumns.Text = statisticsLogic.GetNominalColumnCount().ToString();
    46       txtMissingValuesTotal.Text = statisticsLogic.GetMissingValueCount().ToString();
     40      var logic = Content.StatisticsLogic;
     41      txtRows.Text = logic.GetRowCount().ToString();
     42      txtColumns.Text = logic.GetColumnCount().ToString();
     43      txtNumericColumns.Text = logic.GetNumericColumnCount().ToString();
     44      txtNominalColumns.Text = logic.GetNominalColumnCount().ToString();
     45      txtMissingValuesTotal.Text = logic.GetMissingValueCount().ToString();
    4746
    4847      DataGridViewColumn[] columns = new DataGridViewColumn[COLUMNS];
     
    5150
    5251
    53       for (int i = 0; i < Content.DataDridLogic.Columns; ++i) {
     52      for (int i = 0; i < logic.GetColumnCount(); ++i) {
    5453        var column = new DataGridViewTextBoxColumn();
    5554        column.FillWeight = 1;
     
    5756
    5857        List<string> list;
    59         if (statisticsLogic.IsType<double>(i)) {
     58        if (logic.IsType<double>(i)) {
    6059          list = GetDoubleColumns(i);
    61         } else if (statisticsLogic.IsType<string>(i)) {
     60        } else if (logic.IsType<string>(i)) {
    6261          list = GetStringColumns(i);
    63         } else if (statisticsLogic.IsType<DateTime>(i)) {
     62        } else if (logic.IsType<DateTime>(i)) {
    6463          list = GetDateTimeColumns(i);
    6564        } else {
     
    10099
    101100    private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
    102       if (Content != null && e.RowIndex < columnsRowsMatrix.Count && e.ColumnIndex < Content.DataDridLogic.Columns) {
     101      if (Content != null && e.RowIndex < columnsRowsMatrix.Count && e.ColumnIndex < Content.StatisticsLogic.GetColumnCount()) {
    103102
    104103      }
Note: See TracChangeset for help on using the changeset viewer.