Changeset 12501
- Timestamp:
- 06/23/15 17:12:33 (9 years ago)
- Location:
- branches/DataPreprocessingImprovements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs
r12169 r12501 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using System.Windows.Forms; 25 26 using HeuristicLab.Analysis; … … 60 61 //Add or remove data row 61 62 private void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<StringValue>> checkedItems) { 63 62 64 foreach (IndexedItem<StringValue> item in checkedItems.Items) { 63 65 string variableName = item.Value.Value; … … 122 124 if (Content.VariableItemList == null) { 123 125 Content.VariableItemList = Content.CreateVariableItemList(); 126 } else { 127 var checkedNames = Content.VariableItemList.CheckedItems.Select(x => x.Value.Value); 128 Content.VariableItemList = Content.CreateVariableItemList(checkedNames); 124 129 } 125 130 checkedItemList.Content = Content.VariableItemList; … … 136 141 DataRow row = GetDataRow(variableName); 137 142 138 //add row to data table 139 dataTable.Rows.Add(row); 140 141 //add row to data table per variable 142 d.Rows.Add(row); 143 dataTablePerVariable.Add(d); 143 if (row != null) { 144 //add row to data table 145 dataTable.Rows.Add(row); 146 147 //add row to data table per variable 148 d.Rows.Add(row); 149 dataTablePerVariable.Add(d); 150 } 144 151 } 145 152 … … 153 160 dataTable.SelectedRows.Clear(); 154 161 foreach (var selectedRow in selectedDataRows) { 155 if (VariableIsDisplayed(selectedRow.Name))162 if (VariableIsDisplayed(selectedRow.Name)) 156 163 dataTable.SelectedRows.Add(selectedRow); 157 164 } -
branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingChartContent.cs
r12012 r12501 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using System.Linq; 25 26 using HeuristicLab.Analysis; 26 27 using HeuristicLab.Common; … … 126 127 127 128 128 public ICheckedItemList<StringValue> CreateVariableItemList( ) {129 public ICheckedItemList<StringValue> CreateVariableItemList(IEnumerable<string> checkedItems = null) { 129 130 ICheckedItemList<StringValue> itemList = new CheckedItemList<StringValue>(); 130 131 foreach (string name in PreprocessingData.GetDoubleVariableNames()) { 131 itemList.Add(new StringValue(name), true); 132 var n = new StringValue(name); 133 itemList.Add(n, (checkedItems == null) ? true : checkedItems.Contains(name)); 132 134 } 133 135 return new ReadOnlyCheckedItemList<StringValue>(itemList);
Note: See TracChangeset
for help on using the changeset viewer.