Changeset 14519
- Timestamp:
- 12/22/16 11:02:48 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Analysis.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableControl.cs
r14508 r14519 27 27 using System.Windows.Forms.DataVisualization.Charting; 28 28 using HeuristicLab.Collections; 29 using HeuristicLab.MainForm.WindowsForms; 29 30 30 31 namespace HeuristicLab.Analysis.Views { 31 public partial class DataTableControl : UserControl{32 public partial class DataTableControl : AsynchronousContentView { 32 33 protected List<Series> invisibleSeries; 33 34 protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable; 34 35 35 private DataTable content; 36 public DataTable Content { 37 get { return content; } 38 set { 39 if (value == content) return; 40 if (content != null) DeregisterContentEvents(); 41 content = value; 42 if (content != null) RegisterContentEvents(); 43 OnContentChanged(); 44 SetEnabledStateOfControls(); 45 } 36 public new DataTable Content { 37 get { return (DataTable)base.Content; } 38 set { base.Content = value; } 46 39 } 47 40 … … 56 49 57 50 #region Event Handler Registration 58 protected virtualvoid DeregisterContentEvents() {51 protected override void DeregisterContentEvents() { 59 52 foreach (DataRow row in Content.Rows) 60 53 DeregisterDataRowEvents(row); … … 65 58 Content.Rows.CollectionReset -= new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset); 66 59 } 67 protected virtualvoid RegisterContentEvents() {60 protected override void RegisterContentEvents() { 68 61 Content.VisualPropertiesChanged += new EventHandler(Content_VisualPropertiesChanged); 69 62 Content.Rows.ItemsAdded += new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsAdded); … … 95 88 #endregion 96 89 97 protected virtualvoid OnContentChanged() {90 protected override void OnContentChanged() { 98 91 invisibleSeries.Clear(); 99 92 chart.Titles[0].Text = string.Empty; … … 111 104 } 112 105 113 protected virtualvoid SetEnabledStateOfControls() {106 protected override void SetEnabledStateOfControls() { 114 107 chart.Enabled = Content != null; 115 108 } -
trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.cs
r14516 r14519 29 29 using HeuristicLab.Collections; 30 30 using HeuristicLab.Common; 31 using HeuristicLab.MainForm.WindowsForms; 31 32 32 33 namespace HeuristicLab.Analysis.Views { 33 public partial class ScatterPlotControl : UserControl{34 public partial class ScatterPlotControl : AsynchronousContentView { 34 35 protected List<Series> invisibleSeries; 35 36 protected Dictionary<IObservableList<Point2D<double>>, ScatterPlotDataRow> pointsRowsTable; … … 37 38 private double xMin, xMax, yMin, yMax; 38 39 39 private ScatterPlot content; 40 public ScatterPlot Content { 41 get { return content; } 42 set { 43 if (value == content) return; 44 if (content != null) DeregisterContentEvents(); 45 content = value; 46 if (content != null) RegisterContentEvents(); 47 OnContentChanged(); 48 SetEnabledStateOfControls(); 49 } 40 public new ScatterPlot Content { 41 get { return (ScatterPlot)base.Content; } 42 set { base.Content = value; } 50 43 } 51 44 … … 61 54 62 55 #region Event Handler Registration 63 protected virtualvoid DeregisterContentEvents() {56 protected override void DeregisterContentEvents() { 64 57 foreach (ScatterPlotDataRow row in Content.Rows) 65 58 DeregisterScatterPlotDataRowEvents(row); … … 70 63 Content.Rows.CollectionReset -= new CollectionItemsChangedEventHandler<ScatterPlotDataRow>(Rows_CollectionReset); 71 64 } 72 protected virtualvoid RegisterContentEvents() {65 protected override void RegisterContentEvents() { 73 66 Content.VisualPropertiesChanged += new EventHandler(Content_VisualPropertiesChanged); 74 67 Content.Rows.ItemsAdded += new CollectionItemsChangedEventHandler<ScatterPlotDataRow>(Rows_ItemsAdded); … … 98 91 #endregion 99 92 100 protected virtualvoid OnContentChanged() {93 protected override void OnContentChanged() { 101 94 invisibleSeries.Clear(); 102 95 chart.Titles[0].Text = string.Empty; … … 114 107 } 115 108 116 protected virtualvoid SetEnabledStateOfControls() {109 protected override void SetEnabledStateOfControls() { 117 110 chart.Enabled = Content != null; 118 111 }
Note: See TracChangeset
for help on using the changeset viewer.