From a5ba89efa83d0a4afd0d25dbeba5989e4944b5b8 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 24 十一月 2020 18:57:56 +0800
Subject: [PATCH] 20201124;mqtt代码整理备份

---
 HDL_ON/DAL/Mqtt/MqttClient.cs |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 1d130d4..f65e6ce 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -14,7 +14,7 @@
 
 namespace HDL_ON.DAL.Mqtt
 {
-    public static class MqttCommon
+    public static class MqttClient
     {
         /// <summary>
         /// 鍔犲瘑閫氳KEY
@@ -121,8 +121,6 @@
         {
             if (reset)
             {
-                bNeedStartTip = true;
-                bNeedConnectTip = true;
                 MqttInfoConfig.Current.IfGetMqttInfoSuccess = false;
             }
             await DisConnectRemoteMqttClient(s);
@@ -135,7 +133,7 @@
         public static bool remoteMqttIsConnecting;
         static bool remoteIsConnected;
 
-        static MqttCommon()
+        static MqttClient()
         {
             InitMqtt();
         }
@@ -301,7 +299,6 @@
                                     {
                                         packet.Bytes = e.ApplicationMessage.Payload;
                                     }
-                                    packet.IsLocal = false;
                                     packet.Manager();
                                 }
                             }
@@ -441,12 +438,6 @@
 
             if (MqttInfoConfig.Current.HomeGatewayInfo != null && MqttInfoConfig.Current.mMqttInfo != null)
             {
-                if (bNeedConnectTip)
-                {
-                    bNeedConnectTip = false;
-                    MainPage.LoadingTipShow(Language.StringByID(SimpleControl.R.MyInternationalizationString.GetSuccessfullyStartConnecting));
-                }
-
                 try
                 {
 
@@ -687,8 +678,8 @@
             var mqttInfoRequestResult_Obj =new Server.HttpServerRequest().GetMqttRemoteInfo(GetRandomKey());
             if (mqttInfoRequestResult_Obj != null)
             {
-                MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj;
-                if (UserConfig.Instance.GatewayList != null && UserConfig.Instance.GatewayList.Count > 0)
+                MqttInfoConfig.Cur.mMqttInfo = mqttInfoRequestResult_Obj;
+            if (UserConfig.Instance.GatewayList != null && UserConfig.Instance.GatewayList.Count > 0)
                 {
                     //----绗簩姝ユ壘鍑烘槸鍚﹀瓨鍦ㄥ尮閰嶅綋鍓嶄綇瀹呯殑mac锛屽瓨鍦ㄥ啀杩涜杩滅▼銆�
                     MqttInfoConfig.Current.HomeGatewayInfo = UserConfig.Instance.GatewayList[0];
@@ -702,18 +693,12 @@
                 {
                     Utlis.WriteLine("============>杩樻病缁戝畾缃戝叧");
                 }
-
             }
             else
             {
                 Utlis.WriteLine("============>MqttInfo null");
             }
-
-
-
         }
-
-
     }
 }
 

--
Gitblit v1.8.0