Changeset 16901 for branches/2679_HeuristicLab.GoalSeekingProblem/HeuristicLab.GoalSeekingProblem.Views/3.4/GoalSeekingOptimizerView.cs
- Timestamp:
- 05/06/19 15:36:43 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2679_HeuristicLab.GoalSeekingProblem/HeuristicLab.GoalSeekingProblem.Views/3.4/GoalSeekingOptimizerView.cs
r14526 r16901 20 20 #endregion 21 21 22 using System;23 using System.Windows.Forms;24 22 using HeuristicLab.MainForm; 25 23 using HeuristicLab.Optimization; 26 24 using HeuristicLab.Optimization.Views; 27 25 using HeuristicLab.Problems.DataAnalysis; 26 using System; 27 using System.Windows.Forms; 28 28 29 29 namespace HeuristicLab.GoalSeeking { … … 61 61 protected override void RegisterContentEvents() { 62 62 base.RegisterContentEvents(); 63 Content.AlgorithmChanged += (o, e) => { algorithmViewHost.Content = Content.Optimizer; };64 Content.ProblemChanged += (o, e) => { problemViewHost.Content = Content.Problem; };65 Content.ProblemDataChanged += (o, e) => { dataViewHost.Content = Content.ProblemData; };66 Content.ResultsChanged += (o, e) => { resultsViewHost.Content = Content.Results; };63 Content.AlgorithmChanged += (o, e) => algorithmViewHost.Content = Content.Optimizer; 64 Content.ProblemChanged += (o, e) => problemViewHost.Content = Content.Problem; 65 Content.ProblemDataChanged += (o, e) => dataViewHost.Content = Content.ProblemData; 66 Content.ResultsChanged += (o, e) => resultsViewHost.Content = Content.Results; 67 67 } 68 68 … … 77 77 Content.Problem = (IGoalSeekingProblem)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 78 78 problemViewHost.Content = Content.Problem; 79 } 80 catch (Exception ex) { 79 } catch (Exception ex) { 81 80 MessageBox.Show(ex.Message, "Set problem", MessageBoxButtons.OK, MessageBoxIcon.Error); 82 81 } … … 100 99 Content.Optimizer = (IAlgorithm)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 101 100 algorithmViewHost.Content = Content.Optimizer; 102 } 103 catch (Exception ex) { 101 } catch (Exception ex) { 104 102 MessageBox.Show(ex.Message, "Set algorithm", MessageBoxButtons.OK, MessageBoxIcon.Error); 105 103 } … … 123 121 Content.ProblemData = (IRegressionProblemData)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat); 124 122 dataViewHost.Content = Content.ProblemData; 125 } 126 catch (Exception ex) { 123 } catch (Exception ex) { 127 124 // provide some information to the user 128 125 MessageBox.Show(ex.Message, "Set problem data", MessageBoxButtons.OK, MessageBoxIcon.Error);
Note: See TracChangeset
for help on using the changeset viewer.