From f71a02229c1ba00fbecaead19256593ffb052753 Mon Sep 17 00:00:00 2001 From: duan <dante@isaints.net> Date: 星期三, 21 八月 2024 17:18:40 +0800 Subject: [PATCH] 1 --- src/WindowsFormsApp1/Form1.cs | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/WindowsFormsApp1/Form1.cs b/src/WindowsFormsApp1/Form1.cs index a965dc1..2e0a830 100644 --- a/src/WindowsFormsApp1/Form1.cs +++ b/src/WindowsFormsApp1/Form1.cs @@ -328,7 +328,7 @@ client.MqttMsgUnsubscribed += client_MqttMsgUnsubscribed; //鍙栨秷璁㈤槄涓婚鎴愬姛鍚庤皟鐢� client.MqttMsgPublishReceived += client_MqttMsgPublishReceived; //褰撴帴鏀跺埌璁㈤槄涓婚鐨勬秷鎭椂璋冪敤 client.ConnectionClosed += client_ConnectionClosed; //杩炴帴鏂紑鍚庤皟鐢� - MessageBox.Show("杩炴帴鎴愬姛銆�", "淇℃伅"); + MessageBox.Show("杩炴帴鎴愬姛銆�", "淇℃伅");// } catch (Exception ex) { @@ -377,12 +377,12 @@ client.MqttMsgSubscribed += client_MqttMsgSubscribed; //璁㈤槄涓婚鎴愬姛鍚庤皟鐢� client.MqttMsgUnsubscribed += client_MqttMsgUnsubscribed; //鍙栨秷璁㈤槄涓婚鎴愬姛鍚庤皟鐢� client.MqttMsgPublishReceived += client_MqttMsgPublishReceived; //褰撴帴鏀跺埌璁㈤槄涓婚鐨勬秷鎭椂璋冪敤 - client.ConnectionClosed += client_ConnectionClosed; //杩炴帴鏂紑鍚庤皟鐢� + client.ConnectionClosed += client_ConnectionClosed;//杩炴帴鏂紑鍚庤皟鐢� string[] subscribeTopic = Toprie_MotifList().Split(','); //鍙互鍚屾椂璁㈤槄澶氫釜涓婚鐨勬秷鎭紝鍚勪富棰樹箣闂寸敤閫楀彿鍒嗛殧 byte[] qosLevels = new byte[] { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE }; - foreach (var item in subscribeTopic) { + foreach (var item in subscribeTopic){ string[] MotifNameList ={ item }; client.Subscribe(MotifNameList, qosLevels); } @@ -390,7 +390,7 @@ MessageBox.Show("璁㈤槄涓婚鎴愬姛銆�", "淇℃伅"); } catch (Exception ex){ - MessageBox.Show(ex.Message.ToString(), "寮傚父"); + MessageBox.Show(ex.Message.ToString(),"寮傚父"); } } -- Gitblit v1.8.0