- Timestamp:
- 06/01/10 17:58:03 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SimplifiedSymbolicExpressionModelView.cs
r3797 r3884 39 39 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic { 40 40 [View("Simplified Symbolic Expression Model View")] 41 [Content(typeof(SymbolicRegression Solution))]41 [Content(typeof(SymbolicRegressionModel))] 42 42 public partial class SimplifiedSymbolicExpressionModelView : AsynchronousContentView { 43 public new SymbolicRegressionSolution Content {44 get { return (SymbolicRegressionSolution)base.Content; }45 set { base.Content = value; }46 }47 48 49 43 public SimplifiedSymbolicExpressionModelView() 50 44 : base() { … … 52 46 } 53 47 54 protected override void RegisterContentEvents() { 55 base.RegisterContentEvents(); 56 Content.ModelChanged += new EventHandler(Content_ModelChanged); 57 } 58 59 protected override void DeregisterContentEvents() { 60 base.DeregisterContentEvents(); 61 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 62 } 63 64 void Content_ModelChanged(object sender, EventArgs e) { 65 UpdateTreeChart(); 48 public new SymbolicRegressionModel Content { 49 get { return (SymbolicRegressionModel)base.Content; } 50 set { base.Content = value; } 66 51 } 67 52 68 53 protected override void OnContentChanged() { 69 54 base.OnContentChanged(); 70 UpdateTreeChart(); 55 if (Content != null) 56 UpdateTreeChart(); 57 else 58 viewHost.Content = null; 71 59 } 72 60 73 61 private void UpdateTreeChart() { 74 62 var simplifier = new SymbolicSimplifier(); 75 var simplifiedTree = simplifier.Simplify(Content. Model.SymbolicExpressionTree);63 var simplifiedTree = simplifier.Simplify(Content.SymbolicExpressionTree); 76 64 viewHost.Content = simplifiedTree; 77 65 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicExpressionModelView.cs
r3797 r3884 39 39 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic { 40 40 [View("Symbolic Expression Model View")] 41 [Content(typeof(SymbolicRegression Solution))]41 [Content(typeof(SymbolicRegressionModel),true)] 42 42 public partial class SymbolicExpressionModelView : AsynchronousContentView { 43 public new SymbolicRegressionSolution Content {44 get { return (SymbolicRegressionSolution)base.Content; }45 set { base.Content = value; }46 }47 48 43 public SymbolicExpressionModelView() 49 44 : base() { … … 51 46 } 52 47 53 protected override void RegisterContentEvents() { 54 base.RegisterContentEvents(); 55 Content.ModelChanged += new EventHandler(Content_ModelChanged); 56 } 57 58 protected override void DeregisterContentEvents() { 59 base.DeregisterContentEvents(); 60 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 61 } 62 63 void Content_ModelChanged(object sender, EventArgs e) { 64 UpdateTreeChart(); 48 public new SymbolicRegressionModel Content { 49 get { return (SymbolicRegressionModel)base.Content; } 50 set { base.Content = value; } 65 51 } 66 52 67 53 protected override void OnContentChanged() { 68 54 base.OnContentChanged(); 69 UpdateTreeChart(); 55 if (Content != null) 56 UpdateTreeChart(); 57 else 58 viewHost.Content = null; 70 59 } 71 60 72 61 private void UpdateTreeChart() { 73 viewHost.Content = Content. Model.SymbolicExpressionTree;62 viewHost.Content = Content.SymbolicExpressionTree; 74 63 } 75 64 }
Note: See TracChangeset
for help on using the changeset viewer.