Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/01/11 17:00:33 (13 years ago)
Author:
mkommend
Message:

#1418: Added IFixedValueParameter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs

    r5445 r5582  
    103103    protected override void SetEnabledStateOfControls() {
    104104      base.SetEnabledStateOfControls();
    105       setValueButton.Enabled = Content != null && !ReadOnly;
    106       clearValueButton.Enabled = Content != null && Content.Value != null && !(Content is ValueParameter<T>) && !ReadOnly;
     105      setValueButton.Enabled = Content != null && !(Content is IFixedValueParameter) && !ReadOnly;
     106      clearValueButton.Enabled = Content != null && Content.Value != null && !(Content is IFixedValueParameter) && !ReadOnly;
    107107      showInRunCheckBox.Enabled = Content != null && !ReadOnly;
    108108    }
     
    113113      else {
    114114        SetDataTypeTextBoxText();
    115         clearValueButton.Enabled = Content != null && Content.Value != null && !(Content is ValueParameter<T>) && !ReadOnly;
     115        setValueButton.Enabled = Content != null && !(Content is IFixedValueParameter) && !ReadOnly;
     116        clearValueButton.Enabled = Content != null && Content.Value != null && !(Content is IFixedValueParameter<T>) && !ReadOnly;
    116117        valueViewHost.ViewType = null;
    117118        valueViewHost.Content = Content != null ? Content.Value : null;
     
    148149    protected virtual void valueGroupBox_DragEnterOver(object sender, DragEventArgs e) {
    149150      e.Effect = DragDropEffects.None;
     151      if (Content is IFixedValueParameter) return;
     152
    150153      Type type = e.Data.GetData("Type") as Type;
    151154      if (!ReadOnly && (type != null) && (Content.DataType.IsAssignableFrom(type))) {
Note: See TracChangeset for help on using the changeset viewer.