Changeset 6685 for branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionModelView.cs
- Timestamp:
- 08/31/11 11:52:11 (13 years ago)
- Location:
- branches/GeneralizedQAP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP
- Property svn:mergeinfo changed
/trunk/sources (added) merged: 6648-6649,6652-6656,6661-6674,6676-6681,6684
- Property svn:mergeinfo changed
-
branches/GeneralizedQAP/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionModelView.cs
r6642 r6685 19 19 */ 20 20 #endregion 21 22 using System.Linq; 21 23 using System.Windows.Forms; 24 using HeuristicLab.Common; 22 25 using HeuristicLab.Core.Views; 23 26 using HeuristicLab.MainForm; … … 44 47 protected override void OnContentChanged() { 45 48 base.OnContentChanged(); 46 if (Content != null) 49 if (Content != null) { 50 view.Locked = Content.ProblemData == ClassificationEnsembleProblemData.EmptyProblemData; 47 51 view.Content = Content.ClassificationSolutions; 48 else52 } else 49 53 view.Content = null; 50 54 } … … 62 66 detailsGroupBox.Enabled = Content != null && itemsListView.SelectedItems.Count == 1; 63 67 } 68 69 protected override void itemsListView_DragEnter(object sender, DragEventArgs e) { 70 validDragOperation = false; 71 if (ReadOnly || Locked) return; 72 if (Content.IsReadOnly) return; 73 74 var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 75 validDragOperation = dropData.GetObjectGraphObjects().OfType<IClassificationSolution>().Any(); 76 } 77 protected override void itemsListView_DragDrop(object sender, DragEventArgs e) { 78 if (e.Effect != DragDropEffects.None) { 79 var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 80 var solutions = dropData.GetObjectGraphObjects().OfType<IClassificationSolution>(); 81 if (e.Effect.HasFlag(DragDropEffects.Copy)) { 82 Cloner cloner = new Cloner(); 83 solutions = solutions.Select(s => cloner.Clone(s)); 84 } 85 foreach (var solution in solutions) 86 Content.Add(solution); 87 } 88 } 64 89 } 65 90 }
Note: See TracChangeset
for help on using the changeset viewer.