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)

Location:
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/GraphicalSymbolicExpressionTreeView.cs

    r3294 r3454  
    6060        symbolicExpressionTreeChart.Tree = Content;
    6161      }
     62      SetEnabledStateOfControls();
     63    }
     64
     65    protected override void OnReadOnlyChanged() {
     66      base.OnReadOnlyChanged();
     67      SetEnabledStateOfControls();
     68    }
     69
     70    private void SetEnabledStateOfControls() {
     71      symbolicExpressionTreeChart.Enabled = Content != null;
    6272    }
    6373  }
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionView.cs

    r3442 r3454  
    3535        Caption = "SymbolicExpression View";
    3636        textBox.Text = string.Empty;
    37         textBox.Enabled = false;
    3837      } else {
    3938        textBox.Text = SymbolicExpression(Content.Root, 0);
    40         textBox.Enabled = true;
    4139      }
     40      SetEnabledStateOfControls();
     41    }
     42
     43    protected override void OnReadOnlyChanged() {
     44      base.OnReadOnlyChanged();
     45      SetEnabledStateOfControls();
     46    }
     47
     48    private void SetEnabledStateOfControls() {
     49      textBox.Enabled = Content != null;
     50      textBox.ReadOnly = ReadOnly;
    4251    }
    4352
Note: See TracChangeset for help on using the changeset viewer.