- Timestamp:
- 05/07/14 10:49:15 (10 years ago)
- 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 82 82 _highlightedCellsBackground = new Dictionary<int, IList<int>>(); 83 83 currentCell = null; 84 DataGridView.SelectionChanged += DataGridView_SelectionChanged; 85 } 86 87 void DataGridView_SelectionChanged(object sender, EventArgs e) { 88 Content.DataGridLogic.SetSelection(GetSelectedCells()); 84 89 } 85 90 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs
r10803 r10804 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Drawing;25 24 using System.Windows.Forms; 26 25 using HeuristicLab.Analysis; … … 64 63 if (VariableIsDisplayed(variableName)) { 65 64 dataTable.Rows.Remove(variableName); 66 dataTablePerVariable.Remove(dataTablePerVariable.Find( 65 dataTablePerVariable.Remove(dataTablePerVariable.Find(x => (x.Name == variableName))); 67 66 } else { 68 67 DataRow row = GetDataRow(variableName); … … 91 90 base.RegisterContentEvents(); 92 91 Content.ChartLogic.Changed += PreprocessingData_Changed; 93 92 94 93 } 95 94 … … 112 111 dataTable = new PreprocessingDataTable(chartTitle); 113 112 dataTable.Rows.AddRange(dataRows); 114 113 115 114 116 115 // init data table per variable 117 116 dataTablePerVariable = new List<PreprocessingDataTable>(); 118 foreach (var checkedItem in variableItemList.CheckedItems){117 foreach (var checkedItem in variableItemList.CheckedItems) { 119 118 string variableName = variableItemList[checkedItem.Index].Value; 120 119 PreprocessingDataTable d = new PreprocessingDataTable(variableName); … … 123 122 //rowSelect.Name = variableName + "(Selected)"; 124 123 //rowSelect.VisualProperties.Color = Color.Green; 125 124 126 125 d.Rows.Add(row); 127 126 //d.SelectedRows.Add(rowSelect); 128 127 129 128 dataTablePerVariable.Add(d); 130 129 … … 144 143 if (Content != null) { 145 144 logic = Content.ChartLogic; 146 InitData(); 145 InitData(); 147 146 variableItemList.CheckedItemsChanged += CheckedItemsChanged; 148 GenerateChart(); 147 GenerateChart(); 149 148 } 150 149 } … … 167 166 case DataPreprocessingChangedEventType.Any: 168 167 InitData(); 169 GenerateChart(); 168 GenerateChart(); 170 169 break; 171 170 } … … 217 216 protected void GenerateChart() { 218 217 219 ClearTableLayout(); 218 ClearTableLayout(); 220 219 221 220 if (allInOneMode) { … … 234 233 tableLayoutPanel.AutoScroll = false; 235 234 tableLayoutPanel.AutoScroll = true; 236 } 235 } 237 236 238 237 private void GenerateSingleChartLayout() { … … 247 246 private void GenerateMultiChartLayout() { 248 247 int checkedItemsCnt = 0; 249 foreach (var item in variableItemList.CheckedItems)248 foreach (var item in variableItemList.CheckedItems) 250 249 checkedItemsCnt++; 251 250 … … 262 261 263 262 if (columns == 3) 264 rows = (checkedItemsCnt +2) / columns;265 else if (columns == 2)263 rows = (checkedItemsCnt + 2) / columns; 264 else if (columns == 2) 266 265 rows = (checkedItemsCnt + 1) / columns; 267 266 else … … 274 273 List<PreprocessingDataTable>.Enumerator enumerator = dataTablePerVariable.GetEnumerator(); 275 274 for (int x = 0; x < columns; x++) { 276 277 if (rows <= 3)275 276 if (rows <= 3) 278 277 tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100 / columns)); 279 278 else … … 298 297 p.Dock = DockStyle.Fill; 299 298 tableLayoutPanel.Controls.Add(p, y, x); 300 } 301 else { 299 } else { 302 300 dataView.Content = d; 303 301 dataView.Dock = DockStyle.Fill; -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs
r10803 r10804 20 20 #endregion 21 21 22 using HeuristicLab.Collections;23 using HeuristicLab.Core.Views;24 using HeuristicLab.MainForm;25 22 using System; 26 23 using System.Collections.Generic; … … 29 26 using System.Windows.Forms; 30 27 using System.Windows.Forms.DataVisualization.Charting; 28 using HeuristicLab.Collections; 29 using HeuristicLab.Core.Views; 31 30 using HeuristicLab.DataPreprocessing.Implementations; 31 using HeuristicLab.MainForm; 32 32 33 33 namespace HeuristicLab.Analysis.Views { … … 172 172 else series.Color = Color.Empty; 173 173 series.IsVisibleInLegend = row.VisualProperties.IsVisibleInLegend; 174 174 175 175 switch (row.VisualProperties.ChartType) { 176 176 case DataRowVisualProperties.DataRowChartType.Line: … … 535 535 536 536 // get minimum ignores nan values 537 private double GetMinimum(IEnumerable<double> values) 538 { 537 private double GetMinimum(IEnumerable<double> values) { 539 538 double min = Double.MaxValue; 540 539 541 540 foreach (double value in values) { 542 541 if (!Double.IsNaN(value) && value < min) 543 min = value; 542 min = value; 544 543 } 545 544 return min;
Note: See TracChangeset
for help on using the changeset viewer.