- Timestamp:
- 05/15/17 16:26:34 (7 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
r14981 r14982 27 27 using System.Windows.Forms.DataVisualization.Charting; 28 28 using HeuristicLab.Collections; 29 using HeuristicLab.MainForm.WindowsForms; 29 using HeuristicLab.Core.Views; 30 using HeuristicLab.MainForm; 30 31 31 32 namespace HeuristicLab.Analysis.Views { 32 public partial class DataTableControl : AsynchronousContentView { 33 [View("DataTable View")] 34 [Content(typeof(DataTable), true)] 35 public partial class DataTableView : NamedItemView, IConfigureableView { 33 36 protected List<Series> invisibleSeries; 34 37 protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable; … … 39 42 } 40 43 41 public DataTableControl() { 44 public bool ShowName { 45 get { return nameTextBox.Visible; } 46 set { 47 if (nameTextBox.Visible != value) { 48 foreach (Control c in Controls) { 49 if (c == chart) continue; 50 c.Visible = value; 51 } 52 chart.Dock = value ? DockStyle.None : DockStyle.Fill; 53 } 54 } 55 } 56 57 public DataTableView() { 42 58 InitializeComponent(); 43 59 valuesRowsTable = new Dictionary<IObservableList<double>, DataRow>(); … … 89 105 90 106 protected override void OnContentChanged() { 107 base.OnContentChanged(); 91 108 invisibleSeries.Clear(); 92 109 chart.Titles[0].Text = string.Empty; … … 105 122 106 123 protected override void SetEnabledStateOfControls() { 124 base.SetEnabledStateOfControls(); 107 125 chart.Enabled = Content != null; 108 126 } … … 306 324 #region Event Handlers 307 325 #region Content Event Handlers 326 protected override void Content_NameChanged(object sender, EventArgs e) { 327 if (InvokeRequired) 328 Invoke(new EventHandler(Content_NameChanged), sender, e); 329 else { 330 Content.VisualProperties.Title = Content.Name; 331 base.Content_NameChanged(sender, e); 332 } 333 } 308 334 private void Content_VisualPropertiesChanged(object sender, EventArgs e) { 309 335 if (InvokeRequired)
Note: See TracChangeset
for help on using the changeset viewer.