- Timestamp:
- 08/17/11 14:37:34 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationSolutionView.cs
r6653 r6666 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 ClassificationProblemData)) { 42 validDragOperation = true; 42 if (ReadOnly) return; 43 44 var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 45 if (dropData is ClassificationProblemData) validDragOperation = true; 46 else if (dropData is IValueParameter) { 47 var param = (IValueParameter)dropData; 48 if (param.Value is ClassificationProblemData) validDragOperation = true; 43 49 } 44 50 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs
r6653 r6666 44 44 } 45 45 46 protected override void SetEnabledStateOfControls() { 47 base.SetEnabledStateOfControls(); 48 addButton.Enabled = false; 49 removeButton.Enabled = false; 50 } 51 52 protected override void RegisterContentEvents() { 53 base.RegisterContentEvents(); 54 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 55 } 56 protected override void DeregisterContentEvents() { 57 base.DeregisterContentEvents(); 58 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 59 } 60 private void Content_ProblemDataChanged(object sender, EventArgs e) { 61 OnContentChanged(); 62 } 63 46 64 protected override void OnContentChanged() { 47 65 string selectedName = null; … … 66 84 67 85 protected virtual void AddEvaluationViewTypes() { 68 if (Content != null ) {86 if (Content != null && !Content.ProblemData.IsEmpty) { 69 87 var viewTypes = MainFormManager.GetViewTypes(Content.GetType(), true) 70 88 .Where(t => typeof(IDataAnalysisSolutionEvaluationView).IsAssignableFrom(t)); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
r6653 r6666 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 RegressionProblemData)) { 42 validDragOperation = true; 42 if (ReadOnly) return; 43 44 var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 45 if (dropData is RegressionProblemData) validDragOperation = true; 46 else if (dropData is IValueParameter) { 47 var param = (IValueParameter)dropData; 48 if (param.Value is RegressionProblemData) validDragOperation = true; 43 49 } 44 50 }
Note: See TracChangeset
for help on using the changeset viewer.