Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/16/10 01:49:10 (14 years ago)
Author:
swagner
Message:

Adapted views of HeuristicLab.Core.Views according the new read-only property and renamed method SetEnableStateOfControls into SetEnabledStateOfControls (#973).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.cs

    r3289 r3362  
    7777      if (Content == null) {
    7878        logView.Content = null;
     79        executionTimeTextBox.Text = "-";
     80      } else {
     81        logView.Content = Content.Log;
     82        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
     83      }
     84      SetEnabledStateOfControls();
     85    }
     86
     87    protected override void OnReadOnlyChanged() {
     88      base.OnReadOnlyChanged();
     89      SetEnabledStateOfControls();
     90    }
     91
     92    private void SetEnabledStateOfControls() {
     93      if (Content == null) {
    7994        logView.Enabled = false;
    80         executionTimeTextBox.Text = "-";
    8195        executionTimeTextBox.Enabled = false;
    8296      } else {
    83         logView.Content = Content.Log;
     97        logView.ReadOnly = ReadOnly;
    8498        logView.Enabled = true;
    85         executionTimeTextBox.Text = Content.ExecutionTime.ToString();
    8699        executionTimeTextBox.Enabled = true;
    87100      }
Note: See TracChangeset for help on using the changeset viewer.