Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/21/10 06:14:03 (15 years ago)
Author:
swagner
Message:

Adapted views according the new read-only property (#973)

File:
1 edited

Legend:

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

    r3080 r3454  
    9595      chart.Titles.Clear();
    9696      chart.Series.Clear();
    97       if (Content == null) {
    98         Caption = "DataTable";
    99         chart.Enabled = false;
    100       } else {
     97      Caption = "DataTable";
     98      if (Content != null) {
    10199        Caption = Content.Name + " (" + Content.GetType().Name + ")";
    102         chart.Enabled = true;
    103100        chart.Titles.Add(new Title(Content.Name, Docking.Top));
    104101        foreach (DataRow row in Content.Rows)
    105102          AddDataRow(row);
    106103      }
     104      SetEnabledStateOfControls();
     105    }
     106
     107    protected override void OnReadOnlyChanged() {
     108      base.OnReadOnlyChanged();
     109      SetEnabledStateOfControls();
     110    }
     111
     112    private void SetEnabledStateOfControls() {
     113      chart.Enabled = Content != null;
    107114    }
    108115
Note: See TracChangeset for help on using the changeset viewer.