Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/08/10 17:46:53 (14 years ago)
Author:
mkommend
Message:

Added SetEnabledStateOfControls as protected virtual method in !View. Therefore the overloading of OnReadOnlyChanged and OnLockedChanged got obsolete in most views, because the method got called in the !View respectively ContentView. (ticket #1021)

Location:
trunk/sources/HeuristicLab.Parameters.Views/3.3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ConstrainedValueParameterView.cs

    r3764 r3904  
    9090        viewHost.Content = Content.Value;
    9191      }
    92       SetEnabledStateOfControls();
    9392    }
    9493
    95     protected override void OnReadOnlyChanged() {
    96       base.OnReadOnlyChanged();
    97       SetEnabledStateOfControls();
    98     }
    99 
    100     private void SetEnabledStateOfControls() {
     94    protected override void SetEnabledStateOfControls() {
     95      base.SetEnabledStateOfControls();
    10196      valueGroupBox.Enabled = Content != null;
    10297      valueComboBox.Enabled = (valueComboBox.Items.Count > 0) && !ReadOnly;
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/LookupParameterView.cs

    r3764 r3904  
    7575      else
    7676        actualNameTextBox.Text = Content.ActualName;
    77 
    78       SetEnabledStateOfControls();
    7977    }
    8078
    81     protected override void OnReadOnlyChanged() {
    82       base.OnReadOnlyChanged();
    83       SetEnabledStateOfControls();
    84     }
    85 
    86     private void SetEnabledStateOfControls() {
     79    protected override void SetEnabledStateOfControls() {
     80      base.SetEnabledStateOfControls();
    8781      actualNameTextBox.Enabled = Content != null;
    8882      actualNameTextBox.ReadOnly = ReadOnly;
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ParameterView.cs

    r3764 r3904  
    5656      else
    5757        dataTypeTextBox.Text = Content.DataType.GetPrettyName();
    58 
    59       SetEnabledStateOfControls();
    6058    }
    6159
    62     protected override void OnReadOnlyChanged() {
    63       base.OnReadOnlyChanged();
    64       SetEnabledStateOfControls();
    65     }
    66 
    67     private void SetEnabledStateOfControls() {
     60    protected override void SetEnabledStateOfControls() {
     61      base.SetEnabledStateOfControls();
    6862      dataTypeTextBox.Enabled = Content != null;
    6963    }
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ScopeTreeLookupParameterView.cs

    r3764 r3904  
    8080        depthTextBox.Text = Content.Depth.ToString();
    8181      }
    82       SetEnabledStateOfControls();
    8382    }
    8483
    85     protected override void OnReadOnlyChanged() {
    86       base.OnReadOnlyChanged();
    87       SetEnabledStateOfControls();
    88     }
    89 
    90     private void SetEnabledStateOfControls() {
     84    protected override void SetEnabledStateOfControls() {
     85      base.SetEnabledStateOfControls();
    9186      actualNameTextBox.Enabled = Content != null;
    9287      actualNameTextBox.ReadOnly = ReadOnly;
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs

    r3764 r3904  
    8585        viewHost.Content = Content.Value;
    8686      }
    87       SetEnabledStateOfControls();
    8887    }
    8988
    90     protected override void OnReadOnlyChanged() {
    91       base.OnReadOnlyChanged();
    92       SetEnabledStateOfControls();
    93     }
    94 
    95     private void SetEnabledStateOfControls() {
     89    protected override void SetEnabledStateOfControls() {
     90      base.SetEnabledStateOfControls();
    9691      actualNameTextBox.Enabled = Content != null;
    9792      actualNameTextBox.ReadOnly = ReadOnly;
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs

    r3764 r3904  
    8484        viewHost.Content = Content.Value;
    8585      }
    86       SetEnabledStateOfControls();
    8786    }
    8887
    89     protected override void OnReadOnlyChanged() {
    90       base.OnReadOnlyChanged();
    91       SetEnabledStateOfControls();
    92     }
    93 
    94     private void SetEnabledStateOfControls() {
     88    protected override void SetEnabledStateOfControls() {
     89      base.SetEnabledStateOfControls();
    9590      setValueButton.Enabled = Content != null && !ReadOnly;
    9691      clearValueButton.Enabled = Content != null && Content.Value != null && !ReadOnly;
Note: See TracChangeset for help on using the changeset viewer.