Changeset 11539
- Timestamp:
- 11/12/14 03:02:33 (10 years ago)
- Location:
- branches/OptimizationNetworks
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/Core.Networks.Views/MessagePortView.Designer.cs
r11538 r11539 180 180 // lastMessageView 181 181 // 182 this.lastMessageView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 183 | System.Windows.Forms.AnchorStyles.Left) 184 | System.Windows.Forms.AnchorStyles.Right))); 182 185 this.lastMessageView.Caption = "Message View"; 183 186 this.lastMessageView.Content = null; 184 this.lastMessageView.Dock = System.Windows.Forms.DockStyle.Fill; 185 this.lastMessageView.Location = new System.Drawing.Point(3, 16); 187 this.lastMessageView.Location = new System.Drawing.Point(6, 19); 186 188 this.lastMessageView.Name = "lastMessageView"; 187 189 this.lastMessageView.ReadOnly = true; 188 this.lastMessageView.Size = new System.Drawing.Size(63 9, 194);190 this.lastMessageView.Size = new System.Drawing.Size(633, 188); 189 191 this.lastMessageView.TabIndex = 0; 190 192 // -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/Core.Networks.Views/MessagePortView.cs
r11538 r11539 80 80 clearConnectedPortButton.Enabled = Content != null && Content.ConnectedPort != null && !ReadOnly; 81 81 portParameterCollectionView.Enabled = Content != null && !ReadOnly; 82 cloneParametersFromPortButton.Enabled = Content != null && Content.ConnectedPort != null&& !ReadOnly;82 cloneParametersFromPortButton.Enabled = Content != null && !Content.Parameters.IsReadOnly && !ReadOnly; 83 83 lastMessageView.Enabled = Content != null && !ReadOnly; 84 84 } … … 89 89 else { 90 90 clearConnectedPortButton.Enabled = Content.ConnectedPort != null && !ReadOnly; 91 cloneParametersFromPortButton.Enabled = Content.ConnectedPort != null && !ReadOnly;92 91 connectedPortView.Content = Content.ConnectedPort; 93 92 } … … 163 162 networkItemSelectorDialog.NetworkItemSelector.Configure( 164 163 root, 165 null,164 Content, 166 165 typeof(IParameterizedPort) 167 166 ); -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/Core.Networks.Views/UserDefinedMessagePortView.cs
r11530 r11539 41 41 portParameterCollectionView.Content = Content == null ? null : Content.Parameters; 42 42 } 43 44 protected override void SetEnabledStateOfControls() { 45 base.SetEnabledStateOfControls(); 46 cloneParametersFromPortButton.Enabled = Content != null && !ReadOnly; 47 } 43 48 } 44 49 } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/MessagePort.cs
r11538 r11539 132 132 var message = new Message(); 133 133 134 // collect parameters from local port 135 message.Values.AddRange(Parameters.Select(p => p.CreateMessageValue())); 134 // collect output parameters from local port 135 message.Values.AddRange( 136 Parameters 137 .Where(p => p.Type.HasFlag(PortParameterType.Output)) 138 .Select(p => p.CreateMessageValue()) 139 ); 136 140 137 141 // collect remaining parameters from connected port … … 144 148 } 145 149 150 // collect remaining input parameters from local port 151 message.Values.AddRange( 152 Parameters 153 .Where(p => p.Type.HasFlag(PortParameterType.Input) && !message.Values.ContainsKey(p.Name)) 154 .Select(p => p.CreateMessageValue()) 155 ); 156 146 157 return message; 147 158 } … … 151 162 public void SendMessage(IMessage message, CancellationToken token) { 152 163 if (!PortConnectionValid) throw new InvalidOperationException("Port connection is not valid"); 164 if (ConnectedPort != null) ConnectedPort.ReceiveMessage(message, token); 153 165 LastMessage = message; 154 if (ConnectedPort != null) ConnectedPort.ReceiveMessage(message, token);155 166 OnMessageSent(message, token); 156 167 }
Note: See TracChangeset
for help on using the changeset viewer.