Changeset 16723 for branches/2521_ProblemRefactoring/HeuristicLab.Analysis.Views/3.3/IndexedDataTableView.cs
- Timestamp:
- 03/28/19 16:54:20 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Analysis.Views
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Analysis.Views/3.3/IndexedDataTableView.cs
r16692 r16723 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HeuristicLab.Collections;23 using HeuristicLab.Core.Views;24 using HeuristicLab.MainForm;25 22 using System; 26 23 using System.Collections.Generic; … … 29 26 using System.Windows.Forms; 30 27 using System.Windows.Forms.DataVisualization.Charting; 28 using HeuristicLab.Collections; 29 using HeuristicLab.Core.Views; 30 using HeuristicLab.MainForm; 31 31 32 32 namespace HeuristicLab.Analysis.Views { 33 33 [View("IndexedDataTable View")] 34 34 [Content(typeof(IndexedDataTable<>), true)] 35 public partial class IndexedDataTableView<T> : NamedItemView {35 public partial class IndexedDataTableView<T> : NamedItemView, IConfigureableView { 36 36 protected List<Series> invisibleSeries; 37 37 protected Dictionary<IObservableList<Tuple<T, double>>, IndexedDataRow<T>> valuesRowsTable; … … 49 49 chart.ChartAreas[0].CursorX.Interval = 1; 50 50 chart.SuppressExceptions = true; 51 chart.ContextMenuStrip.Items.Add(configureToolStripMenuItem); 51 52 } 52 53 … … 131 132 base.SetEnabledStateOfControls(); 132 133 chart.Enabled = Content != null; 134 } 135 136 public void ShowConfiguration() { 137 if (Content != null) { 138 using (var dialog = new DataTableVisualPropertiesDialog<IndexedDataRow<T>>(Content)) { 139 dialog.ShowDialog(this); 140 } 141 } else MessageBox.Show("Nothing to configure."); 133 142 } 134 143 … … 211 220 if (Content.VisualProperties.TitleFont != null) chart.Titles[0].Font = Content.VisualProperties.TitleFont; 212 221 if (!Content.VisualProperties.TitleColor.IsEmpty) chart.Titles[0].ForeColor = Content.VisualProperties.TitleColor; 222 chart.Titles[0].Text = Content.VisualProperties.Title; 223 chart.Titles[0].Visible = !string.IsNullOrEmpty(Content.VisualProperties.Title); 213 224 214 225 if (Content.VisualProperties.AxisTitleFont != null) area.AxisX.TitleFont = Content.VisualProperties.AxisTitleFont; … … 313 324 #region Event Handlers 314 325 #region Content Event Handlers 315 protected override void Content_NameChanged(object sender, EventArgs e) {316 if (InvokeRequired)317 Invoke(new EventHandler(Content_NameChanged), sender, e);318 else {319 chart.Titles[0].Text = Content.Name;320 base.Content_NameChanged(sender, e);321 }322 }323 326 private void Content_VisualPropertiesChanged(object sender, EventArgs e) { 324 327 if (InvokeRequired) … … 508 511 } 509 512 #endregion 513 private void configureToolStripMenuItem_Click(object sender, EventArgs e) { 514 ShowConfiguration(); 515 } 510 516 #endregion 511 517
Note: See TracChangeset
for help on using the changeset viewer.