Commit 6019ca53 by 施晓雨

up

parent 59547644
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.btnAddChannel = new System.Windows.Forms.Button(); this.btnAddChannel = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.tbxSubscriptionId = new System.Windows.Forms.TextBox(); this.tbxSubscriptionId = new System.Windows.Forms.TextBox();
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
this.tbxFullName = new System.Windows.Forms.TextBox(); this.tbxFullName = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.tbxHeartBeatTime = new System.Windows.Forms.TextBox(); this.tbxHeartBeatTime = new System.Windows.Forms.TextBox();
this.tbxSessionId = new System.Windows.Forms.TextBox();
this.tbxChannels = new System.Windows.Forms.TextBox(); this.tbxChannels = new System.Windows.Forms.TextBox();
this.tbxUpdateChannel = new System.Windows.Forms.TextBox(); this.tbxUpdateChannel = new System.Windows.Forms.TextBox();
this.btnRemoveChannel = new System.Windows.Forms.Button(); this.btnRemoveChannel = new System.Windows.Forms.Button();
...@@ -58,10 +60,10 @@ ...@@ -58,10 +60,10 @@
this.btnClearDebugMessage = new System.Windows.Forms.Button(); this.btnClearDebugMessage = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.rtbMessage = new System.Windows.Forms.RichTextBox(); this.rtbMessage = new System.Windows.Forms.RichTextBox();
this.tbxSessionId = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label();
this.tbxAuthSessionId = new System.Windows.Forms.TextBox(); this.tbxConnectChannels = new System.Windows.Forms.TextBox();
this.tbxUserId = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
...@@ -70,7 +72,7 @@ ...@@ -70,7 +72,7 @@
// //
// btnConnect // btnConnect
// //
this.btnConnect.Location = new System.Drawing.Point(241, 46); this.btnConnect.Location = new System.Drawing.Point(194, 75);
this.btnConnect.Name = "btnConnect"; this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(41, 23); this.btnConnect.Size = new System.Drawing.Size(41, 23);
this.btnConnect.TabIndex = 0; this.btnConnect.TabIndex = 0;
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(6, 49); this.label1.Location = new System.Drawing.Point(6, 23);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12); this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 1; this.label1.TabIndex = 1;
...@@ -89,16 +91,16 @@ ...@@ -89,16 +91,16 @@
// //
// tbxServiceUrl // tbxServiceUrl
// //
this.tbxServiceUrl.Location = new System.Drawing.Point(67, 46); this.tbxServiceUrl.Location = new System.Drawing.Point(67, 20);
this.tbxServiceUrl.Name = "tbxServiceUrl"; this.tbxServiceUrl.Name = "tbxServiceUrl";
this.tbxServiceUrl.Size = new System.Drawing.Size(163, 21); this.tbxServiceUrl.Size = new System.Drawing.Size(215, 21);
this.tbxServiceUrl.TabIndex = 2; this.tbxServiceUrl.TabIndex = 2;
this.tbxServiceUrl.Text = "http://localhost"; this.tbxServiceUrl.Text = "http://localhost";
// //
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 23); this.label3.Location = new System.Drawing.Point(6, 51);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12); this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 1; this.label3.TabIndex = 1;
...@@ -106,16 +108,15 @@ ...@@ -106,16 +108,15 @@
// //
// tbxUserName // tbxUserName
// //
this.tbxUserName.Location = new System.Drawing.Point(67, 19); this.tbxUserName.Location = new System.Drawing.Point(67, 47);
this.tbxUserName.Name = "tbxUserName"; this.tbxUserName.Name = "tbxUserName";
this.tbxUserName.Size = new System.Drawing.Size(86, 21); this.tbxUserName.Size = new System.Drawing.Size(86, 21);
this.tbxUserName.TabIndex = 2; this.tbxUserName.TabIndex = 2;
this.tbxUserName.Text = "administrator";
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(159, 23); this.label4.Location = new System.Drawing.Point(159, 51);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12); this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 1; this.label4.TabIndex = 1;
...@@ -123,19 +124,19 @@ ...@@ -123,19 +124,19 @@
// //
// tbxPassword // tbxPassword
// //
this.tbxPassword.Location = new System.Drawing.Point(194, 19); this.tbxPassword.Location = new System.Drawing.Point(194, 47);
this.tbxPassword.Name = "tbxPassword"; this.tbxPassword.Name = "tbxPassword";
this.tbxPassword.PasswordChar = '*'; this.tbxPassword.PasswordChar = '*';
this.tbxPassword.Size = new System.Drawing.Size(88, 21); this.tbxPassword.Size = new System.Drawing.Size(88, 21);
this.tbxPassword.TabIndex = 2; this.tbxPassword.TabIndex = 2;
this.tbxPassword.Text = "www.kivii.com";
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.label12); this.groupBox1.Controls.Add(this.label12);
this.groupBox1.Controls.Add(this.tbxAuthSessionId); this.groupBox1.Controls.Add(this.tbxConnectChannels);
this.groupBox1.Controls.Add(this.tbxServiceUrl); this.groupBox1.Controls.Add(this.tbxServiceUrl);
this.groupBox1.Controls.Add(this.label1); this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.btnClearDebugMessage);
this.groupBox1.Controls.Add(this.tbxUserName); this.groupBox1.Controls.Add(this.tbxUserName);
this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.tbxPassword); this.groupBox1.Controls.Add(this.tbxPassword);
...@@ -144,7 +145,7 @@ ...@@ -144,7 +145,7 @@
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(297, 105); this.groupBox1.Size = new System.Drawing.Size(291, 102);
this.groupBox1.TabIndex = 5; this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "连接信息"; this.groupBox1.Text = "连接信息";
...@@ -155,17 +156,16 @@ ...@@ -155,17 +156,16 @@
this.panel1.Controls.Add(this.groupBox2); this.panel1.Controls.Add(this.groupBox2);
this.panel1.Controls.Add(this.btnGetSubscriptions); this.panel1.Controls.Add(this.btnGetSubscriptions);
this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.btnClearDebugMessage);
this.panel1.Controls.Add(this.groupBox1); this.panel1.Controls.Add(this.groupBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Left; this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(297, 680); this.panel1.Size = new System.Drawing.Size(291, 680);
this.panel1.TabIndex = 8; this.panel1.TabIndex = 8;
// //
// btnNotify // btnNotify
// //
this.btnNotify.Location = new System.Drawing.Point(125, 329); this.btnNotify.Location = new System.Drawing.Point(125, 437);
this.btnNotify.Name = "btnNotify"; this.btnNotify.Name = "btnNotify";
this.btnNotify.Size = new System.Drawing.Size(105, 23); this.btnNotify.Size = new System.Drawing.Size(105, 23);
this.btnNotify.TabIndex = 11; this.btnNotify.TabIndex = 11;
...@@ -183,7 +183,9 @@ ...@@ -183,7 +183,9 @@
this.groupBox2.Controls.Add(this.tbxSubscriptionId); this.groupBox2.Controls.Add(this.tbxSubscriptionId);
this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.tbxConnectedTime); this.groupBox2.Controls.Add(this.tbxConnectedTime);
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label5); this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.tbxUserId);
this.groupBox2.Controls.Add(this.tbxFullName); this.groupBox2.Controls.Add(this.tbxFullName);
this.groupBox2.Controls.Add(this.label6); this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.tbxHeartBeatTime); this.groupBox2.Controls.Add(this.tbxHeartBeatTime);
...@@ -192,16 +194,16 @@ ...@@ -192,16 +194,16 @@
this.groupBox2.Controls.Add(this.tbxUpdateChannel); this.groupBox2.Controls.Add(this.tbxUpdateChannel);
this.groupBox2.Controls.Add(this.btnRemoveChannel); this.groupBox2.Controls.Add(this.btnRemoveChannel);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox2.Location = new System.Drawing.Point(0, 105); this.groupBox2.Location = new System.Drawing.Point(0, 102);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(297, 176); this.groupBox2.Size = new System.Drawing.Size(291, 219);
this.groupBox2.TabIndex = 10; this.groupBox2.TabIndex = 10;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "状态信息"; this.groupBox2.Text = "状态信息";
// //
// btnAddChannel // btnAddChannel
// //
this.btnAddChannel.Location = new System.Drawing.Point(164, 140); this.btnAddChannel.Location = new System.Drawing.Point(178, 179);
this.btnAddChannel.Name = "btnAddChannel"; this.btnAddChannel.Name = "btnAddChannel";
this.btnAddChannel.Size = new System.Drawing.Size(47, 23); this.btnAddChannel.Size = new System.Drawing.Size(47, 23);
this.btnAddChannel.TabIndex = 3; this.btnAddChannel.TabIndex = 3;
...@@ -212,42 +214,51 @@ ...@@ -212,42 +214,51 @@
// label7 // label7
// //
this.label7.AutoSize = true; this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(162, 58); this.label7.Location = new System.Drawing.Point(162, 24);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(29, 12); this.label7.Size = new System.Drawing.Size(29, 12);
this.label7.TabIndex = 1; this.label7.TabIndex = 1;
this.label7.Text = "心跳"; this.label7.Text = "心跳";
// //
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(12, 76);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(53, 12);
this.label11.TabIndex = 1;
this.label11.Text = "会话编号";
//
// label10 // label10
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 118); this.label10.Location = new System.Drawing.Point(11, 53);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(53, 12); this.label10.Size = new System.Drawing.Size(53, 12);
this.label10.TabIndex = 1; this.label10.TabIndex = 1;
this.label10.Text = "我的订阅"; this.label10.Text = "我的频道";
// //
// label8 // label8
// //
this.label8.AutoSize = true; this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(12, 147); this.label8.Location = new System.Drawing.Point(12, 186);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(53, 12); this.label8.Size = new System.Drawing.Size(53, 12);
this.label8.TabIndex = 1; this.label8.TabIndex = 1;
this.label8.Text = "订阅频道"; this.label8.Text = "更新频道";
// //
// tbxSubscriptionId // tbxSubscriptionId
// //
this.tbxSubscriptionId.Location = new System.Drawing.Point(194, 27); this.tbxSubscriptionId.Location = new System.Drawing.Point(67, 98);
this.tbxSubscriptionId.Name = "tbxSubscriptionId"; this.tbxSubscriptionId.Name = "tbxSubscriptionId";
this.tbxSubscriptionId.ReadOnly = true; this.tbxSubscriptionId.ReadOnly = true;
this.tbxSubscriptionId.Size = new System.Drawing.Size(88, 21); this.tbxSubscriptionId.Size = new System.Drawing.Size(215, 21);
this.tbxSubscriptionId.TabIndex = 2; this.tbxSubscriptionId.TabIndex = 2;
// //
// label9 // label9
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(12, 58); this.label9.Location = new System.Drawing.Point(12, 24);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(53, 12); this.label9.Size = new System.Drawing.Size(53, 12);
this.label9.TabIndex = 1; this.label9.TabIndex = 1;
...@@ -255,16 +266,16 @@ ...@@ -255,16 +266,16 @@
// //
// tbxConnectedTime // tbxConnectedTime
// //
this.tbxConnectedTime.Enabled = false; this.tbxConnectedTime.Location = new System.Drawing.Point(67, 19);
this.tbxConnectedTime.Location = new System.Drawing.Point(67, 53);
this.tbxConnectedTime.Name = "tbxConnectedTime"; this.tbxConnectedTime.Name = "tbxConnectedTime";
this.tbxConnectedTime.ReadOnly = true;
this.tbxConnectedTime.Size = new System.Drawing.Size(86, 21); this.tbxConnectedTime.Size = new System.Drawing.Size(86, 21);
this.tbxConnectedTime.TabIndex = 2; this.tbxConnectedTime.TabIndex = 2;
// //
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 30); this.label5.Location = new System.Drawing.Point(12, 130);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 12); this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 1; this.label5.TabIndex = 1;
...@@ -272,48 +283,56 @@ ...@@ -272,48 +283,56 @@
// //
// tbxFullName // tbxFullName
// //
this.tbxFullName.Enabled = false; this.tbxFullName.Location = new System.Drawing.Point(67, 125);
this.tbxFullName.Location = new System.Drawing.Point(67, 25);
this.tbxFullName.Name = "tbxFullName"; this.tbxFullName.Name = "tbxFullName";
this.tbxFullName.Size = new System.Drawing.Size(86, 21); this.tbxFullName.ReadOnly = true;
this.tbxFullName.Size = new System.Drawing.Size(214, 21);
this.tbxFullName.TabIndex = 2; this.tbxFullName.TabIndex = 2;
// //
// label6 // label6
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(161, 30); this.label6.Location = new System.Drawing.Point(12, 103);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(29, 12); this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 1; this.label6.TabIndex = 1;
this.label6.Text = "编号"; this.label6.Text = "订阅编号";
// //
// tbxHeartBeatTime // tbxHeartBeatTime
// //
this.tbxHeartBeatTime.BackColor = System.Drawing.Color.YellowGreen; this.tbxHeartBeatTime.BackColor = System.Drawing.Color.YellowGreen;
this.tbxHeartBeatTime.Enabled = false; this.tbxHeartBeatTime.Enabled = false;
this.tbxHeartBeatTime.Location = new System.Drawing.Point(194, 54); this.tbxHeartBeatTime.Location = new System.Drawing.Point(194, 20);
this.tbxHeartBeatTime.Name = "tbxHeartBeatTime"; this.tbxHeartBeatTime.Name = "tbxHeartBeatTime";
this.tbxHeartBeatTime.Size = new System.Drawing.Size(88, 21); this.tbxHeartBeatTime.Size = new System.Drawing.Size(88, 21);
this.tbxHeartBeatTime.TabIndex = 2; this.tbxHeartBeatTime.TabIndex = 2;
// //
// tbxSessionId
//
this.tbxSessionId.Location = new System.Drawing.Point(67, 71);
this.tbxSessionId.Name = "tbxSessionId";
this.tbxSessionId.ReadOnly = true;
this.tbxSessionId.Size = new System.Drawing.Size(215, 21);
this.tbxSessionId.TabIndex = 2;
//
// tbxChannels // tbxChannels
// //
this.tbxChannels.Enabled = false; this.tbxChannels.Location = new System.Drawing.Point(66, 47);
this.tbxChannels.Location = new System.Drawing.Point(67, 112);
this.tbxChannels.Name = "tbxChannels"; this.tbxChannels.Name = "tbxChannels";
this.tbxChannels.ReadOnly = true;
this.tbxChannels.Size = new System.Drawing.Size(215, 21); this.tbxChannels.Size = new System.Drawing.Size(215, 21);
this.tbxChannels.TabIndex = 2; this.tbxChannels.TabIndex = 2;
// //
// tbxUpdateChannel // tbxUpdateChannel
// //
this.tbxUpdateChannel.Location = new System.Drawing.Point(67, 141); this.tbxUpdateChannel.Location = new System.Drawing.Point(67, 180);
this.tbxUpdateChannel.Name = "tbxUpdateChannel"; this.tbxUpdateChannel.Name = "tbxUpdateChannel";
this.tbxUpdateChannel.Size = new System.Drawing.Size(86, 21); this.tbxUpdateChannel.Size = new System.Drawing.Size(105, 21);
this.tbxUpdateChannel.TabIndex = 2; this.tbxUpdateChannel.TabIndex = 2;
// //
// btnRemoveChannel // btnRemoveChannel
// //
this.btnRemoveChannel.Location = new System.Drawing.Point(231, 140); this.btnRemoveChannel.Location = new System.Drawing.Point(231, 179);
this.btnRemoveChannel.Name = "btnRemoveChannel"; this.btnRemoveChannel.Name = "btnRemoveChannel";
this.btnRemoveChannel.Size = new System.Drawing.Size(51, 23); this.btnRemoveChannel.Size = new System.Drawing.Size(51, 23);
this.btnRemoveChannel.TabIndex = 0; this.btnRemoveChannel.TabIndex = 0;
...@@ -323,7 +342,7 @@ ...@@ -323,7 +342,7 @@
// //
// btnGetSubscriptions // btnGetSubscriptions
// //
this.btnGetSubscriptions.Location = new System.Drawing.Point(14, 288); this.btnGetSubscriptions.Location = new System.Drawing.Point(14, 396);
this.btnGetSubscriptions.Name = "btnGetSubscriptions"; this.btnGetSubscriptions.Name = "btnGetSubscriptions";
this.btnGetSubscriptions.Size = new System.Drawing.Size(139, 23); this.btnGetSubscriptions.Size = new System.Drawing.Size(139, 23);
this.btnGetSubscriptions.TabIndex = 9; this.btnGetSubscriptions.TabIndex = 9;
...@@ -342,11 +361,11 @@ ...@@ -342,11 +361,11 @@
// //
// btnClearDebugMessage // btnClearDebugMessage
// //
this.btnClearDebugMessage.Location = new System.Drawing.Point(164, 288); this.btnClearDebugMessage.Location = new System.Drawing.Point(241, 74);
this.btnClearDebugMessage.Name = "btnClearDebugMessage"; this.btnClearDebugMessage.Name = "btnClearDebugMessage";
this.btnClearDebugMessage.Size = new System.Drawing.Size(118, 23); this.btnClearDebugMessage.Size = new System.Drawing.Size(41, 23);
this.btnClearDebugMessage.TabIndex = 7; this.btnClearDebugMessage.TabIndex = 7;
this.btnClearDebugMessage.Text = "清除调试信息"; this.btnClearDebugMessage.Text = "清";
this.btnClearDebugMessage.UseVisualStyleBackColor = true; this.btnClearDebugMessage.UseVisualStyleBackColor = true;
this.btnClearDebugMessage.Click += new System.EventHandler(this.btnClearDebugMessage_Click); this.btnClearDebugMessage.Click += new System.EventHandler(this.btnClearDebugMessage_Click);
// //
...@@ -354,9 +373,9 @@ ...@@ -354,9 +373,9 @@
// //
this.groupBox3.Controls.Add(this.rtbMessage); this.groupBox3.Controls.Add(this.rtbMessage);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Location = new System.Drawing.Point(297, 0); this.groupBox3.Location = new System.Drawing.Point(291, 0);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(705, 680); this.groupBox3.Size = new System.Drawing.Size(711, 680);
this.groupBox3.TabIndex = 9; this.groupBox3.TabIndex = 9;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "调试信息"; this.groupBox3.Text = "调试信息";
...@@ -367,43 +386,42 @@ ...@@ -367,43 +386,42 @@
this.rtbMessage.Dock = System.Windows.Forms.DockStyle.Fill; this.rtbMessage.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbMessage.Location = new System.Drawing.Point(3, 17); this.rtbMessage.Location = new System.Drawing.Point(3, 17);
this.rtbMessage.Name = "rtbMessage"; this.rtbMessage.Name = "rtbMessage";
this.rtbMessage.Size = new System.Drawing.Size(699, 660); this.rtbMessage.Size = new System.Drawing.Size(705, 660);
this.rtbMessage.TabIndex = 4; this.rtbMessage.TabIndex = 4;
this.rtbMessage.Text = ""; this.rtbMessage.Text = "";
// //
// tbxSessionId
//
this.tbxSessionId.Enabled = false;
this.tbxSessionId.Location = new System.Drawing.Point(67, 82);
this.tbxSessionId.Name = "tbxSessionId";
this.tbxSessionId.Size = new System.Drawing.Size(215, 21);
this.tbxSessionId.TabIndex = 2;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(12, 87);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(53, 12);
this.label11.TabIndex = 1;
this.label11.Text = "会话编号";
//
// label12 // label12
// //
this.label12.AutoSize = true; this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(8, 78); this.label12.Location = new System.Drawing.Point(6, 80);
this.label12.Name = "label12"; this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(53, 12); this.label12.Size = new System.Drawing.Size(53, 12);
this.label12.TabIndex = 3; this.label12.TabIndex = 3;
this.label12.Text = "会话编号"; this.label12.Text = "初始频道";
//
// tbxConnectChannels
//
this.tbxConnectChannels.Location = new System.Drawing.Point(66, 76);
this.tbxConnectChannels.Name = "tbxConnectChannels";
this.tbxConnectChannels.Size = new System.Drawing.Size(122, 21);
this.tbxConnectChannels.TabIndex = 4;
//
// tbxUserId
//
this.tbxUserId.Location = new System.Drawing.Point(66, 152);
this.tbxUserId.Name = "tbxUserId";
this.tbxUserId.ReadOnly = true;
this.tbxUserId.Size = new System.Drawing.Size(214, 21);
this.tbxUserId.TabIndex = 2;
// //
// tbxAuthSessionId // label13
// //
this.tbxAuthSessionId.Enabled = false; this.label13.AutoSize = true;
this.tbxAuthSessionId.Location = new System.Drawing.Point(67, 73); this.label13.Location = new System.Drawing.Point(11, 157);
this.tbxAuthSessionId.Name = "tbxAuthSessionId"; this.label13.Name = "label13";
this.tbxAuthSessionId.Size = new System.Drawing.Size(215, 21); this.label13.Size = new System.Drawing.Size(53, 12);
this.tbxAuthSessionId.TabIndex = 4; this.label13.TabIndex = 1;
this.label13.Text = "用户编号";
// //
// FrmMain // FrmMain
// //
...@@ -460,7 +478,9 @@ ...@@ -460,7 +478,9 @@
private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox tbxSessionId; private System.Windows.Forms.TextBox tbxSessionId;
private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox tbxAuthSessionId; private System.Windows.Forms.TextBox tbxConnectChannels;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox tbxUserId;
} }
} }
...@@ -32,13 +32,13 @@ namespace Test ...@@ -32,13 +32,13 @@ namespace Test
//连接操作 //连接操作
btnConnect.Enabled=false; btnConnect.Enabled=false;
_client = new ServerEventsClient(tbxServiceUrl.Text); _client = new ServerEventsClient(tbxServiceUrl.Text);
_client.OnConnect = onConnected; _client.OnConnect = onConnected;//连接成功
_client.OnCommand = onCommand; _client.OnCommand = onCommand;//收到命令
_client.OnMessage = onMessage; _client.OnMessage = onMessage;//收到消息
_client.OnException = onException; _client.OnException = onException;//发生异常
_client.OnHeartbeat = onHeartbeat; _client.OnHeartbeat = onHeartbeat;//心跳
_client.Handlers["test"] = testHandler; _client.Handlers["test"] = testHandler;
_client.Channels = tbxConnectChannels.Text.Split(new char[1] { ','},StringSplitOptions.RemoveEmptyEntries);
//如果用户名为空,匿名连接 //如果用户名为空,匿名连接
if (tbxUserName.Text.IsNullOrEmpty()) if (tbxUserName.Text.IsNullOrEmpty())
{ {
...@@ -46,9 +46,9 @@ namespace Test ...@@ -46,9 +46,9 @@ namespace Test
return; return;
} }
var auth = new Authenticate { UserName =tbxUserName.Text, Password = tbxPassword.Text, provider = "kivii" }; var auth = new Authenticate { UserName =tbxUserName.Text, Password = tbxPassword.Text, provider = "kivii" };
var task=_client.ServiceClient.PostAsync(auth); //_client.ServiceClient.PostAsync(auth);
var task=_client.AuthenticateAsync(auth);//等同于_client.ServiceClient.PostAsync
task.Success((res)=>{ task.Success((res)=>{
tbxAuthSessionId.Text = res.SessionId;
//登陆成功后连接ServerEvents,设置事件 //登陆成功后连接ServerEvents,设置事件
_client.Connect(); _client.Connect();
}, true); }, true);
...@@ -83,7 +83,7 @@ namespace Test ...@@ -83,7 +83,7 @@ namespace Test
tbxSubscriptionId.Text = connection.SubscriptionId; tbxSubscriptionId.Text = connection.SubscriptionId;
tbxSessionId.Text = connection.SessionId; tbxSessionId.Text = connection.SessionId;
tbxChannels.Text = connection.Channels?.Join(","); tbxChannels.Text = connection.Channels?.Join(",");
tbxUserId.Text = connection.UserId;
tbxConnectedTime.Text = DateTime.Now.ToString("HH:mm:ss"); tbxConnectedTime.Text = DateTime.Now.ToString("HH:mm:ss");
tbxConnectedTime.BackColor = tbxConnectedTime.BackColor != Color.MistyRose ? Color.MistyRose : Color.YellowGreen; tbxConnectedTime.BackColor = tbxConnectedTime.BackColor != Color.MistyRose ? Color.MistyRose : Color.YellowGreen;
...@@ -157,6 +157,7 @@ namespace Test ...@@ -157,6 +157,7 @@ namespace Test
btnRemoveChannel.Enabled = false; btnRemoveChannel.Enabled = false;
var task=_client.UnsubscribeFromChannelsAsync(tbxUpdateChannel.Text.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries)); var task=_client.UnsubscribeFromChannelsAsync(tbxUpdateChannel.Text.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries));
task.Success(()=>{ task.Success(()=>{
tbxChannels.Text = _client.Channels.Join(",");
btnRemoveChannel.Enabled = true; btnRemoveChannel.Enabled = true;
}); });
task.Error((ex)=> { task.Error((ex)=> {
...@@ -172,6 +173,7 @@ namespace Test ...@@ -172,6 +173,7 @@ namespace Test
btnAddChannel.Enabled = false; btnAddChannel.Enabled = false;
var task = _client.SubscribeToChannelsAsync(tbxUpdateChannel.Text.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries)); var task = _client.SubscribeToChannelsAsync(tbxUpdateChannel.Text.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries));
task.Success(() => { task.Success(() => {
tbxChannels.Text = _client.Channels.Join(",");
btnAddChannel.Enabled = true; btnAddChannel.Enabled = true;
}); });
task.Error((ex) => { task.Error((ex) => {
......
...@@ -32,8 +32,9 @@ ...@@ -32,8 +32,9 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Kivii.Common.V4.5, Version=5.6.2022.8200, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Kivii.Common.V4.5, Version=5.6.2024.1140, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Kivii.Common.5.6.2022.8200\lib\net45\Kivii.Common.V4.5.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\localhost\net45\app\Kivii.Common.V4.5.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Kivii.Common" version="5.6.2022.8200" targetFramework="net45" /> <package id="Kivii.Common" version="5.6.2024.1140" targetFramework="net45" />
</packages> </packages>
\ No newline at end of file
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