Free cookie consent management tool by TermsFeed Policy Generator

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Views/3.3/AlgorithmOperatorView.cs

    r3376 r3454  
    7575      if (Content == null) {
    7676        breakpointCheckBox.Checked = false;
    77         breakpointCheckBox.Enabled = false;
    7877        parameterCollectionView.Content = null;
    7978        operatorGraphViewHost.Content = null;
    80         tabControl.Enabled = false;
    8179      } else {
    8280        breakpointCheckBox.Checked = Content.Breakpoint;
    83         breakpointCheckBox.Enabled = true;
    8481        parameterCollectionView.Content = ((IOperator)Content).Parameters;
    8582        operatorGraphViewHost.ViewType = null;
    8683        operatorGraphViewHost.Content = Content.OperatorGraph;
    87         tabControl.Enabled = true;
    8884      }
     85      SetEnabledStateOfControls();
     86    }
     87
     88    protected override void OnReadOnlyChanged() {
     89      base.OnReadOnlyChanged();
     90      SetEnabledStateOfControls();
     91    }
     92
     93    private void SetEnabledStateOfControls() {
     94      breakpointCheckBox.Enabled = Content != null && !ReadOnly;
     95      parameterCollectionView.Enabled = Content != null;
     96      parameterCollectionView.ReadOnly = ReadOnly;
     97      operatorGraphViewHost.Enabled = Content != null;
     98      operatorGraphViewHost.ReadOnly = ReadOnly;
    8999    }
    90100
Note: See TracChangeset for help on using the changeset viewer.