Ignore:
Timestamp:
10/09/14 03:10:16 (8 years ago)
Author:
swagner
Message:

#2205: Worked on optimization networks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/InputPortView.cs

    r11423 r11431  
    3939    }
    4040
     41    private void UpdateOutputPortTextBoxText() {
     42      if ((Content == null) || (Content.OutputPort == null)) {
     43        outputPortTextBox.Text = string.Empty;
     44      } else {
     45        outputPortTextBox.Text = Content.OutputPort.Path + "." + Content.OutputPort.ToString();
     46      }
     47    }
     48
    4149    protected override void DeregisterContentEvents() {
    4250      Content.OutputPortChanged -= Content_OutputPortChanged;
    4351      base.DeregisterContentEvents();
    4452    }
    45 
    4653    protected override void RegisterContentEvents() {
    4754      base.RegisterContentEvents();
     
    5158    protected override void OnContentChanged() {
    5259      base.OnContentChanged();
    53       outputPortTextBox.Text = ((Content == null) || (Content.OutputPort == null)) ? string.Empty : Content.OutputPort.ToString();
     60      UpdateOutputPortTextBoxText();
    5461    }
    5562
     
    5865      outputPortTextBox.Enabled = Content != null && !ReadOnly;
    5966    }
     67
    6068    protected virtual void Content_OutputPortChanged(object sender, EventArgs e) {
    6169      if (InvokeRequired)
    6270        Invoke(new EventHandler(Content_OutputPortChanged), sender, e);
    6371      else {
    64         outputPortTextBox.Text = Content.OutputPort == null ? string.Empty : Content.OutputPort.ToString();
     72        UpdateOutputPortTextBoxText();
    6573      }
    6674    }
Note: See TracChangeset for help on using the changeset viewer.