Changeset 9162 for branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowDataView.cs
- Timestamp:
- 01/15/13 13:19:28 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SlidingWindowDataView.cs
r7850 r9162 32 32 public partial class SlidingWindowDataView : ItemView { 33 33 private const string TARGETVARIABLE_SERIES_NAME = "Target Variable"; 34 private const string ESTIMATEDVAlUES_SERIES_NAME = "Estimated Values"; 34 35 35 36 public new SlidingWindowData Content { … … 59 60 protected override void RegisterContentEvents() { 60 61 base.RegisterContentEvents(); 61 Content.SlidingWindowPosition.ValueChanged += new System.EventHandler(SlidingWindowPosition_ValueChanged); 62 Content.SlidingWindowPosition.ValueChanged += new EventHandler(SlidingWindowPosition_ValueChanged); 63 Content.EstimatedValuesChanged += new EventHandler(EstimatedValuesChanged); 62 64 } 63 65 protected override void DeregisterContentEvents() { 64 Content.SlidingWindowPosition.ValueChanged -= new System.EventHandler(SlidingWindowPosition_ValueChanged); 66 Content.SlidingWindowPosition.ValueChanged -= new EventHandler(SlidingWindowPosition_ValueChanged); 67 Content.EstimatedValuesChanged -= new EventHandler(EstimatedValuesChanged); 65 68 base.DeregisterContentEvents(); 66 69 } … … 71 74 } 72 75 73 private void SlidingWindowPosition_ValueChanged(object sender, System.EventArgs e) {76 private void SlidingWindowPosition_ValueChanged(object sender, EventArgs e) { 74 77 if (InvokeRequired) Invoke((Action<object, EventArgs>)SlidingWindowPosition_ValueChanged, sender, e); 75 78 else UpdateStripLine(); 79 } 80 private void EstimatedValuesChanged(object sender, EventArgs e) { 81 if (InvokeRequired) Invoke((Action<object, EventArgs>)EstimatedValuesChanged, sender, e); 82 else RedrawChart(); 76 83 } 77 84 … … 83 90 chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine; 84 91 chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindY(Content.TargetValues.ToArray()); 92 93 if (Content.EstimatedValues.Any()) { 94 chart.Series.Add(ESTIMATEDVAlUES_SERIES_NAME); 95 chart.Series[ESTIMATEDVAlUES_SERIES_NAME].ChartType = SeriesChartType.FastLine; 96 chart.Series[ESTIMATEDVAlUES_SERIES_NAME].Points.DataBindY(Content.EstimatedValues.ToArray()); 97 } 85 98 86 99 UpdateStripLine();
Note: See TracChangeset
for help on using the changeset viewer.