Changeset 11519 for branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/GenericPortView.cs
- Timestamp:
- 11/02/14 03:03:21 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/GenericPortView.cs
r11501 r11519 52 52 53 53 protected override void DeregisterContentEvents() { 54 Content.InterfaceChanged -= Content_InterfaceChanged;55 54 Content.ConnectedPortChanged -= Content_ConnectedPortChanged; 55 Content.PortConnectionValidChanged -= Content_PortConnectionValidChanged; 56 Content.LogMessagesChanged -= Content_LogMessagesChanged; 56 57 base.DeregisterContentEvents(); 57 58 } 58 59 protected override void RegisterContentEvents() { 59 60 base.RegisterContentEvents(); 60 Content.InterfaceChanged += Content_InterfaceChanged;61 61 Content.ConnectedPortChanged += Content_ConnectedPortChanged; 62 Content.PortConnectionValidChanged += Content_PortConnectionValidChanged; 63 Content.LogMessagesChanged += Content_LogMessagesChanged; 62 64 } 63 65 … … 66 68 connectedPortView.Content = Content == null ? null : Content.ConnectedPort; 67 69 portParameterCollectionView.Content = Content == null ? null : Content.Parameters; 70 logMessagesCheckBox.Checked = Content == null ? false : Content.LogMessages; 68 71 messageCollectionView.Content = Content == null ? null : Content.Messages; 69 72 errorProvider.SetError(connectedPortView, ((Content == null) || Content.PortConnectionValid) ? string.Empty : "Port connection is not valid"); … … 78 81 portParameterCollectionView.Enabled = Content != null && !ReadOnly; 79 82 cloneConnectedPortParametersButton.Enabled = Content != null && Content.ConnectedPort != null && !ReadOnly; 83 logMessagesCheckBox.Enabled = Content != null && !ReadOnly; 80 84 messageCollectionView.Enabled = Content != null && !ReadOnly; 81 85 } … … 90 94 } 91 95 } 92 protected virtual void Content_ InterfaceChanged(object sender, EventArgs e) {96 protected virtual void Content_PortConnectionValidChanged(object sender, EventArgs e) { 93 97 if (InvokeRequired) 94 Invoke(new EventHandler(Content_ InterfaceChanged), sender, e);98 Invoke(new EventHandler(Content_PortConnectionValidChanged), sender, e); 95 99 else { 96 100 errorProvider.SetError(connectedPortView, Content.PortConnectionValid ? string.Empty : "Port connection is not valid"); 101 } 102 } 103 protected virtual void Content_LogMessagesChanged(object sender, EventArgs e) { 104 if (InvokeRequired) 105 Invoke(new EventHandler(Content_LogMessagesChanged), sender, e); 106 else { 107 logMessagesCheckBox.Checked = Content.LogMessages; 97 108 } 98 109 } … … 148 159 Content.CloneConnectedPortParameters(); 149 160 } 161 protected virtual void logMessagesCheckBox_CheckedChanged(object sender, EventArgs e) { 162 Content.LogMessages = logMessagesCheckBox.Checked; 163 } 150 164 } 151 165 }
Note: See TracChangeset
for help on using the changeset viewer.