Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/10 01:49:10 (14 years ago)
Author:
swagner
Message:

Adapted views of HeuristicLab.Core.Views according the new read-only property and renamed method SetEnableStateOfControls into SetEnabledStateOfControls (#973).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/ParameterizedNamedItemView.cs

    r2917 r3362  
    5252    protected override void OnContentChanged() {
    5353      base.OnContentChanged();
    54       if (Content == null) {
    55         parameterCollectionView.Content = null;
    56       } else {
    57         parameterCollectionView.Content = Content.Parameters;
    58       }
     54      parameterCollectionView.Content = Content == null ? null : Content.Parameters;
     55      SetEnabledStateOfControls();
     56    }
     57
     58    protected override void OnReadOnlyChanged() {
     59      base.OnReadOnlyChanged();
     60      SetEnabledStateOfControls();
     61    }
     62
     63    private void SetEnabledStateOfControls() {
     64      parameterCollectionView.Enabled = Content != null;
     65      parameterCollectionView.ReadOnly = ReadOnly;
    5966    }
    6067  }
Note: See TracChangeset for help on using the changeset viewer.