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.Optimization.Views/3.3/EngineAlgorithmView.cs

    r3423 r3454  
    8888      if (Content == null) {
    8989        engineViewHost.Content = null;
    90         createUserDefinedAlgorithmButton.Enabled = false;
    9190        operatorGraphViewHost.Content = null;
    9291      } else {
     
    9998        operatorGraphViewHost.ViewType = null;
    10099        operatorGraphViewHost.Content = Content.OperatorGraph;
    101         createUserDefinedAlgorithmButton.Enabled = true;
    102100      }
    103101      SetEnableStateOfControls();
     
    108106      SetEnableStateOfControls();
    109107    }
     108    protected override void OnLockedChanged() {
     109      base.OnLockedChanged();
     110      SetEnableStateOfControls();
     111    }
    110112    private void SetEnableStateOfControls() {
     113      engineViewHost.Enabled = Content != null;
    111114      engineViewHost.ReadOnly = ReadOnly;
    112       if (Content == null)
    113         engineComboBox.Enabled = false;
    114       else
    115         engineComboBox.Enabled = Content.ExecutionState != ExecutionState.Started;
     115      newOperatorGraphButton.Enabled = false;
     116      openOperatorGraphButton.Enabled = false;
     117      operatorGraphViewHost.Enabled = Content != null;
     118      engineComboBox.Enabled = Content != null && !ReadOnly;
     119      createUserDefinedAlgorithmButton.Enabled = Content != null && !Locked;
    116120    }
    117121
    118     protected override void Content_ExecutionStateChanged(object sender, EventArgs e) {
    119       if (InvokeRequired)
    120         Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
    121       else {
    122         createUserDefinedAlgorithmButton.Enabled = Content.ExecutionState != ExecutionState.Started;
    123         base.Content_ExecutionStateChanged(sender, e);
    124       }
    125     }
    126122    protected virtual void Content_EngineChanged(object sender, System.EventArgs e) {
    127123      if (InvokeRequired)
Note: See TracChangeset for help on using the changeset viewer.