Changeset 14963 for stable/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.cs
- Timestamp:
- 05/11/17 13:44:01 (7 years ago)
- Location:
- stable
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14381-14382,14384,14388,14418,14425
- Property svn:mergeinfo changed
-
stable/HeuristicLab.DataPreprocessing.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.DataPreprocessing.Views merged: 14381-14382,14384,14388,14418,14425
- Property svn:mergeinfo changed
-
stable/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.cs
r14382 r14963 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Drawing; 24 25 using System.Linq; … … 43 44 } 44 45 45 protected bool VariableIsChecked(string name) {46 protected bool IsVariableChecked(string name) { 46 47 return Content.VariableItemList.CheckedItems.Any(x => x.Value.Value == name); 47 48 } 48 49 protected IList<string> GetCheckedVariables() { 50 return checkedItemList.Content.CheckedItems.Select(i => i.Value.Value).ToList(); 51 } 49 52 50 53 protected override void OnContentChanged() { … … 53 56 54 57 if (Content.VariableItemList == null) { 55 Content.VariableItemList = Content.CreateVariableItemList(); 58 IList<string> inputs = Content.PreprocessingData.InputVariables; 59 if (Content.PreprocessingData.TargetVariable != null) 60 inputs = inputs.Union(new[] { Content.PreprocessingData.TargetVariable }).ToList(); 61 Content.VariableItemList = Content.CreateVariableItemList(inputs); 56 62 } else { 57 63 var checkedNames = Content.VariableItemList.CheckedItems.Select(x => x.Value.Value); 58 Content.VariableItemList = Content.CreateVariableItemList(checkedNames );64 Content.VariableItemList = Content.CreateVariableItemList(checkedNames.ToList()); 59 65 } 60 66 Content.VariableItemList.CheckedItemsChanged += CheckedItemsChanged; … … 64 70 var inputAndTarget = Content.PreprocessingData.InputVariables.Union(target != null ? new[] { target } : new string[] { }); 65 71 foreach (var col in Content.PreprocessingData.GetDoubleVariableNames().Except(inputAndTarget)) { 66 var listViewItem = checkedItemList.ItemsListView.FindItemWithText(col );72 var listViewItem = checkedItemList.ItemsListView.FindItemWithText(col, false, 0, false); 67 73 listViewItem.ForeColor = Color.LightGray; 68 74 } … … 103 109 Content.VariableItemList.Add(new StringValue(name)); 104 110 if (!Content.PreprocessingData.InputVariables.Contains(name) && Content.PreprocessingData.TargetVariable != name) { 105 var listViewItem = checkedItemList.ItemsListView.FindItemWithText(name );111 var listViewItem = checkedItemList.ItemsListView.FindItemWithText(name, false, 0, false); 106 112 listViewItem.ForeColor = Color.LightGray; 107 113 }
Note: See TracChangeset
for help on using the changeset viewer.