- Timestamp:
- 01/22/14 14:38:34 (11 years ago)
- 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 219 219 </ProjectReference> 220 220 </ItemGroup> 221 <ItemGroup>222 <EmbeddedResource Include="Views\StatisticsView.resx">223 <DependentUpon>StatisticsView.cs</DependentUpon>224 </EmbeddedResource>225 </ItemGroup>226 221 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 227 222 <PropertyGroup> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticsContent.cs
r10367 r10370 1 using HeuristicLab.Common; 1 using System.Drawing; 2 using HeuristicLab.Common; 2 3 using HeuristicLab.Core; 3 using System.Drawing;4 using System;5 using System.Collections.Generic;6 using System.Linq;7 using System.Text;8 4 9 namespace HeuristicLab.DataPreprocessing 10 { 5 namespace HeuristicLab.DataPreprocessing { 11 6 [Item("Statistics", "Represents the statistics grid.")] 12 public class StatisticsContent : Item 13 { 7 public class StatisticsContent : Item { 14 8 15 9 private readonly IStatisticsLogic statisticsLogic; 16 private readonly IDataGridLogic dataGridLogic; 17 public StatisticsContent(IStatisticsLogic theStatisticsLogic, IDataGridLogic theDataGridLogic) 18 { 10 public StatisticsContent(IStatisticsLogic theStatisticsLogic) { 19 11 statisticsLogic = theStatisticsLogic; 20 dataGridLogic = theDataGridLogic;21 12 } 22 13 23 14 public StatisticsContent(StatisticsContent content, Cloner cloner) 24 : base(content, cloner) 25 { 15 : base(content, cloner) { 26 16 27 17 } 28 18 29 public IStatisticsLogic StatisticsLogic 30 { 19 public IStatisticsLogic StatisticsLogic { 31 20 get { return statisticsLogic; } 32 21 } 33 22 34 public IDataGridLogic DataDridLogic { 35 get { return dataGridLogic; } 36 } 37 38 public static new Image StaticItemImage 39 { 23 public static new Image StaticItemImage { 40 24 get { return HeuristicLab.Common.Resources.VSImageLibrary.Statistics; } 41 25 } 42 26 43 public override IDeepCloneable Clone(Cloner cloner) 44 { 27 public override IDeepCloneable Clone(Cloner cloner) { 45 28 return new StatisticsContent(this, cloner); 46 29 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/StatisticsView.cs
r10369 r10370 38 38 } 39 39 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(); 47 46 48 47 DataGridViewColumn[] columns = new DataGridViewColumn[COLUMNS]; … … 51 50 52 51 53 for (int i = 0; i < Content.DataDridLogic.Columns; ++i) {52 for (int i = 0; i < logic.GetColumnCount(); ++i) { 54 53 var column = new DataGridViewTextBoxColumn(); 55 54 column.FillWeight = 1; … … 57 56 58 57 List<string> list; 59 if ( statisticsLogic.IsType<double>(i)) {58 if (logic.IsType<double>(i)) { 60 59 list = GetDoubleColumns(i); 61 } else if ( statisticsLogic.IsType<string>(i)) {60 } else if (logic.IsType<string>(i)) { 62 61 list = GetStringColumns(i); 63 } else if ( statisticsLogic.IsType<DateTime>(i)) {62 } else if (logic.IsType<DateTime>(i)) { 64 63 list = GetDateTimeColumns(i); 65 64 } else { … … 100 99 101 100 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()) { 103 102 104 103 }
Note: See TracChangeset
for help on using the changeset viewer.