Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/10 04:13:49 (14 years ago)
Author:
mkommend
Message:

adapted HL.Optimization.Views to new ReadOnly mechanism (ticket #973)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs

    r3299 r3367  
    9797        executionTimeTextBox.Enabled = true;
    9898      }
     99      SetEnableStateOfControls();
     100    }
     101    protected override void OnReadOnlyChanged() {
     102      base.OnReadOnlyChanged();
     103      SetEnableStateOfControls();
     104    }
     105    private void SetEnableStateOfControls() {
     106      repetitionsNumericUpDown.ReadOnly = ReadOnly;
     107      algorithmViewHost.ReadOnly = ReadOnly;
     108      runsView.ReadOnly = ReadOnly;
    99109    }
    100110
     
    109119        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
    110120      else {
    111         nameTextBox.Enabled = Content.ExecutionState != ExecutionState.Started;
    112         descriptionTextBox.Enabled = Content.ExecutionState != ExecutionState.Started;
     121        this.ReadOnly = Content.ExecutionState == ExecutionState.Started;
    113122        SaveEnabled = Content.ExecutionState != ExecutionState.Started;
    114         repetitionsNumericUpDown.Enabled = Content.ExecutionState != ExecutionState.Started;
    115123        newAlgorithmButton.Enabled = openAlgorithmButton.Enabled = saveAlgorithmButton.Enabled = Content.ExecutionState != ExecutionState.Started;
    116124        EnableDisableButtons();
     
    237245    private void algorithmPanel_DragEnterOver(object sender, DragEventArgs e) {
    238246      e.Effect = DragDropEffects.None;
     247      if (ReadOnly)
     248        return;
    239249      Type type = e.Data.GetData("Type") as Type;
    240250      if ((type != null) && (typeof(IAlgorithm).IsAssignableFrom(type))) {
Note: See TracChangeset for help on using the changeset viewer.