Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/15/18 11:47:03 (6 years ago)
Author:
pfleck
Message:

#2947

  • Added interfaces for DataRow and DataTable (IDataTable is generic because the NamedItemCollection is invariant)
  • Adapted DataTableVisualPropertiesDialog to use the new interfaces
  • Added IConfigurableView to IndexedDataTableView
  • Fixed VisualProperty.Title change in IndexedDataTableView
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2947_ConfigurableIndexedDataTable/HeuristicLab.Analysis.Views/3.3/IndexedDataTableView.cs

    r15583 r16149  
    2020#endregion
    2121
    22 using HeuristicLab.Collections;
    23 using HeuristicLab.Core.Views;
    24 using HeuristicLab.MainForm;
    2522using System;
    2623using System.Collections.Generic;
     
    2926using System.Windows.Forms;
    3027using System.Windows.Forms.DataVisualization.Charting;
     28using HeuristicLab.Collections;
     29using HeuristicLab.Core.Views;
     30using HeuristicLab.MainForm;
    3131
    3232namespace HeuristicLab.Analysis.Views {
    3333  [View("IndexedDataTable View")]
    3434  [Content(typeof(IndexedDataTable<>), true)]
    35   public partial class IndexedDataTableView<T> : NamedItemView {
     35  public partial class IndexedDataTableView<T> : NamedItemView, IConfigureableView {
    3636    protected List<Series> invisibleSeries;
    3737    protected Dictionary<IObservableList<Tuple<T, double>>, IndexedDataRow<T>> valuesRowsTable;
     
    131131      base.SetEnabledStateOfControls();
    132132      chart.Enabled = Content != null;
     133    }
     134
     135    public void ShowConfiguration() {
     136      if (Content != null) {
     137        using (var dialog = new DataTableVisualPropertiesDialog<IndexedDataRow<T>>(Content)) {
     138          dialog.ShowDialog(this);
     139        }
     140      } else MessageBox.Show("Nothing to configure.");
    133141    }
    134142
     
    211219      if (Content.VisualProperties.TitleFont != null) chart.Titles[0].Font = Content.VisualProperties.TitleFont;
    212220      if (!Content.VisualProperties.TitleColor.IsEmpty) chart.Titles[0].ForeColor = Content.VisualProperties.TitleColor;
     221      chart.Titles[0].Text = Content.VisualProperties.Title;
     222      chart.Titles[0].Visible = !string.IsNullOrEmpty(Content.VisualProperties.Title);
    213223
    214224      if (Content.VisualProperties.AxisTitleFont != null) area.AxisX.TitleFont = Content.VisualProperties.AxisTitleFont;
Note: See TracChangeset for help on using the changeset viewer.