- Timestamp:
- 09/01/11 10:46:20 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClusteringSolutionView.cs
r6653 r6692 21 21 22 22 using System.Windows.Forms; 23 using HeuristicLab.Core; 23 24 using HeuristicLab.MainForm; 24 25 … … 39 40 protected override void itemsListView_DragEnter(object sender, DragEventArgs e) { 40 41 validDragOperation = false; 41 if (!ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is ClusteringProblemData)) { 42 validDragOperation = true; 42 if (ReadOnly) return; 43 44 var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 45 if (dropData is ClusteringProblemData) validDragOperation = true; 46 else if (dropData is IValueParameter) { 47 var param = (IValueParameter)dropData; 48 if (param.Value is ClusteringProblemData) validDragOperation = true; 43 49 } 44 50 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs
r6666 r6692 25 25 using System.Linq; 26 26 using System.Windows.Forms; 27 using HeuristicLab.Core; 27 28 using HeuristicLab.Core.Views; 28 29 using HeuristicLab.MainForm; … … 139 140 protected override void itemsListView_DragEnter(object sender, DragEventArgs e) { 140 141 validDragOperation = false; 141 if (!ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is DataAnalysisProblemData)) { 142 validDragOperation = true; 142 if (ReadOnly) return; 143 144 var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 145 if (dropData is DataAnalysisProblemData) validDragOperation = true; 146 else if (dropData is IValueParameter) { 147 var param = (IValueParameter)dropData; 148 if (param.Value is DataAnalysisProblemData) validDragOperation = true; 143 149 } 144 150 } … … 146 152 protected override void itemsListView_DragDrop(object sender, DragEventArgs e) { 147 153 if (e.Effect != DragDropEffects.None) { 148 if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is DataAnalysisProblemData) { 149 DataAnalysisProblemData problemData = (DataAnalysisProblemData)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 154 var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 155 if (dropData is DataAnalysisProblemData) { 156 DataAnalysisProblemData problemData = (DataAnalysisProblemData)dropData; 150 157 Content.ProblemData = (DataAnalysisProblemData)problemData.Clone(); 158 } else if (dropData is IValueParameter) { 159 var param = (IValueParameter)dropData; 160 DataAnalysisProblemData problemData = param.Value as DataAnalysisProblemData; 161 if (problemData != null) 162 Content.ProblemData = (DataAnalysisProblemData)problemData.Clone(); 151 163 } 152 164 }
Note: See TracChangeset
for help on using the changeset viewer.