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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationTCPChannelView.cs

    r3896 r3904  
    8484        portTextBox.Text = Content.Port.ToString();
    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      bool readOnlyDriverNullOrStarted = ReadOnly || Content == null || Content.IsInitialized;
    9691      ipAddressTextBox.Enabled = !readOnlyDriverNullOrStarted;
     
    105100        try {
    106101          System.Net.IPAddress.Parse(ipAddressTextBox.Text);
    107         } catch (FormatException) {
     102        }
     103        catch (FormatException) {
    108104          e.Cancel = true;
    109105        }
     
    121117      try {
    122118        Content.Open();
    123       } catch (Exception ex) {
     119      }
     120      catch (Exception ex) {
    124121        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    125122      }
     
    128125      try {
    129126        Content.Close();
    130       } catch (Exception ex) {
     127      }
     128      catch (Exception ex) {
    131129        PluginInfrastructure.ErrorHandling.ShowErrorDialog(ex);
    132130      }
Note: See TracChangeset for help on using the changeset viewer.