Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/29/11 04:17:02 (12 years ago)
Author:
swagner
Message:

Adapted DataTableVisualPropertiesDialog, DataTableVisualPropertiesControl, and DataRowVisualPropertiesControl according to the HL GUI standards (#1724)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs

    r7224 r7244  
    3131
    3232namespace HeuristicLab.Analysis.Views {
    33   /// <summary>
    34   /// The visual representation of a <see cref="Variable"/>.
    35   /// </summary>
    3633  [View("DataTable View")]
    3734  [Content(typeof(DataTable), true)]
     
    3936    protected List<Series> invisibleSeries;
    4037    protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable;
    41     /// <summary>
    42     /// Gets or sets the variable to represent visually.
    43     /// </summary>
    44     /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
    45     /// No own data storage present.</remarks>
     38
    4639    public new DataTable Content {
    4740      get { return (DataTable)base.Content; }
     
    4942    }
    5043
    51     /// <summary>
    52     /// Initializes a new instance of <see cref="VariableView"/> with caption "Variable".
    53     /// </summary>
    5444    public DataTableView() {
    5545      InitializeComponent();
     
    6151
    6252    #region Event Handler Registration
    63     /// <summary>
    64     /// Removes the eventhandlers from the underlying <see cref="Variable"/>.
    65     /// </summary>
    66     /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    6753    protected override void DeregisterContentEvents() {
    6854      foreach (DataRow row in Content.Rows)
     
    7561      base.DeregisterContentEvents();
    7662    }
    77 
    78     /// <summary>
    79     /// Adds eventhandlers to the underlying <see cref="Variable"/>.
    80     /// </summary>
    81     /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    8263    protected override void RegisterContentEvents() {
    8364      base.RegisterContentEvents();
     
    9172    }
    9273
    93     /// <summary>
    94     /// Automatically called for every existing data row and whenever a data row is added
    95     /// to the data table. Do not call this method directly.
    96     /// </summary>
    97     /// <param name="row">The DataRow that was added.</param>
    9874    protected virtual void RegisterDataRowEvents(DataRow row) {
    9975      row.NameChanged += new EventHandler(Row_NameChanged);
     
    10682      row.Values.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_CollectionReset);
    10783    }
    108 
    109     /// <summary>
    110     /// Automatically called for every data row that is removed from the DataTable. Do
    111     /// not directly call this method.
    112     /// </summary>
    113     /// <param name="row">The DataRow that was removed.</param>
    11484    protected virtual void DeregisterDataRowEvents(DataRow row) {
    11585      row.Values.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsAdded);
     
    148118    public void ShowConfiguration() {
    149119      if (Content != null) {
    150         DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(Content);
    151         dialog.ShowDialog();
     120        using (DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(Content)) {
     121          dialog.ShowDialog(this);
     122        }
    152123      } else MessageBox.Show("Nothing to configure.");
    153124    }
    154125
    155     /// <summary>
    156     /// Add the DataRow as a series to the chart.
    157     /// </summary>
    158     /// <param name="row">DataRow to add as series to the chart.</param>
    159126    protected virtual void AddDataRow(DataRow row) {
    160127      Series series = new Series(row.Name);
     
    266233    }
    267234
    268     /// <summary>
    269     /// Set the Y Cursor interval to visible points of enabled series.
    270     /// </summary>
    271235    protected virtual void UpdateYCursorInterval() {
    272236      double interestingValuesRange = (
     
    287251
    288252
    289     /// <summary>
    290     /// Remove the corresponding series for a certain DataRow.
    291     /// </summary>
    292     /// <param name="row">DataRow which series should be removed.</param>
    293253    protected virtual void RemoveDataRow(DataRow row) {
    294254      Series series = chart.Series[row.Name];
     
    672632    }
    673633
    674     /// <summary>
    675     /// Determines whether a double value can be displayed (converted to Decimal and not an NaN).
    676     /// </summary>
    677     /// <param name="x">The number to check.</param>
    678     /// <returns><code>true</code> if the value can be safely shwon in the chart,
    679     /// <code>false</code> otherwise.</returns>
    680634    protected static bool IsInvalidValue(double x) {
    681635      return double.IsNaN(x) || x < (double)decimal.MinValue || x > (double)decimal.MaxValue;
Note: See TracChangeset for help on using the changeset viewer.