Changeset 7399 for branches/ChangeDatasetOfRegressionModel/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views
- Timestamp:
- 01/23/12 17:14:54 (13 years ago)
- Location:
- branches/ChangeDatasetOfRegressionModel/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ChangeDatasetOfRegressionModel/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views
-
Property
svn:ignore
set to
*.resx
-
Property
svn:ignore
set to
-
branches/ChangeDatasetOfRegressionModel/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/NamedDataAnalysisSolutionView.cs
r7259 r7399 56 56 if (viewType != null) { 57 57 view = (DataAnalysisSolutionView)Activator.CreateInstance(viewType); 58 view.Locked = this.Locked; 59 view.ReadOnly = this.ReadOnly; 58 60 view.Dock = DockStyle.Fill; 59 61 view.Content = Content; -
branches/ChangeDatasetOfRegressionModel/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs
r7338 r7399 58 58 // 59 59 // 60 // splitContainer.Panel 160 // splitContainer.Panel2 61 61 // 62 this.splitContainer.Panel 1.Controls.Add(this.btnImport);62 this.splitContainer.Panel2.Controls.Add(this.btnImport); 63 63 // 64 64 // itemsGroupBox … … 76 76 // btnImport 77 77 // 78 this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 79 this.btnImport.Location = new System.Drawing.Point(172, 4); 78 this.btnImport.Location = new System.Drawing.Point(3, 4); 80 79 this.btnImport.Name = "btnImport"; 81 80 this.btnImport.Size = new System.Drawing.Size(75, 23); -
branches/ChangeDatasetOfRegressionModel/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
r7347 r7399 43 43 } 44 44 45 protected override void SetEnabledStateOfControls() { 46 base.SetEnabledStateOfControls(); 47 btnImport.Enabled = !Locked && !ReadOnly && Content != null; 48 } 49 45 50 #region drag and drop 46 51 protected override void itemsListView_DragEnter(object sender, DragEventArgs e) { … … 67 72 } 68 73 69 IRegressionProblemData problemData = null; 70 if (hlFile != null && hlFile is RegressionProblemData) { 71 problemData = (RegressionProblemData)hlFile; 72 } else if (hlFile != null && hlFile is IRegressionProblem) { 73 problemData = ((IRegressionProblem)hlFile).ProblemData; 74 } 75 if (problemData != null) { 76 StringBuilder message = new StringBuilder(); 77 if (!problemData.TargetVariable.Equals(Content.ProblemData.TargetVariable)) 78 message.AppendLine("The target variables are not matching. Old target variable: '" + Content.ProblemData.TargetVariable 79 + "'. New targetvariable: '" + problemData.TargetVariable + "'"); 80 81 List<string> variables = problemData.InputVariables.Select(x => x.Value).ToList(); 82 83 foreach (var item in Content.ProblemData.InputVariables.CheckedItems) { 84 if (!variables.Contains(item.Value.Value)) 85 message.AppendLine("Input variable '" + item.Value.Value + "' is not in the new problem data."); 74 if (hlFile != null) { 75 IRegressionProblemData problemData = null; 76 if (hlFile is RegressionProblemData) { 77 problemData = (RegressionProblemData)hlFile; 78 } else if (hlFile is IRegressionProblem) { 79 problemData = ((IRegressionProblem)hlFile).ProblemData; 80 } else if (hlFile is IRegressionSolution) { 81 problemData = ((IRegressionSolution)hlFile).ProblemData; 86 82 } 87 83 88 if (message.Length != 0) 89 ErrorHandling.ShowErrorDialog(this, new Exception(message.ToString())); 90 else 91 Content.ProblemData = problemData; 84 if (problemData == null) { 85 ErrorHandling.ShowErrorDialog(this, 86 new NullReferenceException("The problem data is null." + Environment.NewLine 87 + "The .hl-file is no RegressionProblemData or RegressionProblem.")); 88 } else { 89 StringBuilder message = new StringBuilder(); 90 if (!problemData.TargetVariable.Equals(Content.ProblemData.TargetVariable)) 91 message.AppendLine("The target variables are not matching. Old target variable: '" 92 + Content.ProblemData.TargetVariable 93 + "'. New targetvariable: '" + problemData.TargetVariable + "'"); 94 95 List<string> variables = problemData.InputVariables.Select(x => x.Value).ToList(); 96 97 foreach (var item in Content.ProblemData.InputVariables.CheckedItems) { 98 if (!variables.Contains(item.Value.Value)) 99 message.AppendLine("Input variable '" + item.Value.Value + "' is not in the new problem data."); 100 } 101 102 if (message.Length != 0) 103 ErrorHandling.ShowErrorDialog(this, new Exception(message.ToString())); 104 else 105 Content.ProblemData = problemData; 106 } 92 107 } 93 108 }
Note: See TracChangeset
for help on using the changeset viewer.