- Timestamp:
- 10/02/12 13:46:27 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
r8600 r8719 265 265 --> 266 266 <PropertyGroup> 267 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)267 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 268 268 set ProjectDir=$(ProjectDir) 269 269 set SolutionDir=$(SolutionDir) … … 272 272 call PreBuildEvent.cmd 273 273 </PreBuildEvent> 274 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">274 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 275 275 export ProjectDir=$(ProjectDir) 276 276 export SolutionDir=$(SolutionDir) -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionModelView.cs
r7259 r8719 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using System.Windows.Forms; 24 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 25 27 using HeuristicLab.Core.Views; 26 28 using HeuristicLab.MainForm; … … 83 85 solutions = solutions.Select(s => cloner.Clone(s)); 84 86 } 85 foreach (var solution in solutions) 86 Content.Add(solution); 87 var solutionCollection = Content as ItemCollection<IClassificationSolution>; 88 if (solutionCollection != null) { 89 solutionCollection.AddRange(solutions); 90 } else { 91 foreach (var solution in solutions) 92 Content.Add(solution); 93 } 94 } 95 } 96 protected override void itemsListView_KeyDown(object sender, KeyEventArgs e) { 97 var solutionCollection = Content as ItemCollection<IClassificationSolution>; 98 if (e.KeyCode == Keys.Delete && solutionCollection != null) { 99 if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly && !ReadOnly) { 100 solutionCollection.RemoveRange(itemsListView.SelectedItems.Cast<ListViewItem>().Select(x => (IClassificationSolution)x.Tag)); 101 } 102 } else { 103 base.itemsListView_KeyDown(sender, e); 104 } 105 } 106 protected override void removeButton_Click(object sender, EventArgs e) { 107 var solutionCollection = Content as ItemCollection<IClassificationSolution>; 108 if (itemsListView.SelectedItems.Count > 0 && solutionCollection != null) { 109 solutionCollection.RemoveRange(itemsListView.SelectedItems.Cast<ListViewItem>().Select(x => (IClassificationSolution)x.Tag)); 110 itemsListView.SelectedItems.Clear(); 111 } else { 112 base.removeButton_Click(sender, e); 87 113 } 88 114 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionEnsembleSolutionModelView.cs
r7259 r8719 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using System.Windows.Forms; 24 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 25 27 using HeuristicLab.Core.Views; 26 28 using HeuristicLab.MainForm; … … 83 85 solutions = solutions.Select(s => cloner.Clone(s)); 84 86 } 85 foreach (var solution in solutions) 86 Content.Add(solution); 87 var solutionCollection = Content as ItemCollection<IRegressionSolution>; 88 if (solutionCollection != null) { 89 solutionCollection.AddRange(solutions); 90 } else { 91 foreach (var solution in solutions) 92 Content.Add(solution); 93 } 94 } 95 } 96 protected override void itemsListView_KeyDown(object sender, KeyEventArgs e) { 97 var solutionCollection = Content as ItemCollection<IRegressionSolution>; 98 if (e.KeyCode == Keys.Delete && solutionCollection != null) { 99 if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly && !ReadOnly) { 100 solutionCollection.RemoveRange(itemsListView.SelectedItems.Cast<ListViewItem>().Select(x => (IRegressionSolution)x.Tag)); 101 } 102 } else { 103 base.itemsListView_KeyDown(sender, e); 104 } 105 } 106 protected override void removeButton_Click(object sender, EventArgs e) { 107 var solutionCollection = Content as ItemCollection<IRegressionSolution>; 108 if (itemsListView.SelectedItems.Count > 0 && solutionCollection != null) { 109 solutionCollection.RemoveRange(itemsListView.SelectedItems.Cast<ListViewItem>().Select(x => (IRegressionSolution)x.Tag)); 110 itemsListView.SelectedItems.Clear(); 111 } else { 112 base.removeButton_Click(sender, e); 87 113 } 88 114 }
Note: See TracChangeset
for help on using the changeset viewer.