Commit d1b8d731 by 施晓雨

Test

parent 692a465b
...@@ -218,9 +218,9 @@ ...@@ -218,9 +218,9 @@
// //
// tbxSubscriptionId // tbxSubscriptionId
// //
this.tbxSubscriptionId.Enabled = false;
this.tbxSubscriptionId.Location = new System.Drawing.Point(194, 27); this.tbxSubscriptionId.Location = new System.Drawing.Point(194, 27);
this.tbxSubscriptionId.Name = "tbxSubscriptionId"; this.tbxSubscriptionId.Name = "tbxSubscriptionId";
this.tbxSubscriptionId.ReadOnly = true;
this.tbxSubscriptionId.Size = new System.Drawing.Size(88, 21); this.tbxSubscriptionId.Size = new System.Drawing.Size(88, 21);
this.tbxSubscriptionId.TabIndex = 2; this.tbxSubscriptionId.TabIndex = 2;
// //
......
...@@ -113,9 +113,10 @@ namespace Test ...@@ -113,9 +113,10 @@ namespace Test
Invoke(new Action(() => onCommand(command))); Invoke(new Action(() => onCommand(command)));
return; return;
} }
if (command is ServerEventUpdate) var eventUpdate = command as ServerEventUpdate;
if (eventUpdate!=null&&eventUpdate.SubscriptionId==_client.ConnectionInfo.SubscriptionId)
{ {
tbxChannels.Text = (command as ServerEventUpdate).Channels.Join(","); tbxChannels.Text = eventUpdate.Channels.Join(",");
} }
rtbMessage.AppendText($"{DateTime.Now.ToString("HH:mm:ss")}:{command.GetType().Name} {command.Json}{Environment.NewLine}{Environment.NewLine}"); rtbMessage.AppendText($"{DateTime.Now.ToString("HH:mm:ss")}:{command.GetType().Name} {command.Json}{Environment.NewLine}{Environment.NewLine}");
rtbMessage.ScrollToCaret(); rtbMessage.ScrollToCaret();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment