From a9ce331dccd25eee1d0b9193f7853c6e4a07b792 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 14 四月 2020 15:43:57 +0800
Subject: [PATCH] 2020-04-14 1.去掉登录之前ping域名检测,解决客户反馈登录失败的问题 2.替换新的控件库,去掉高德地图。 3.修复创建不了住宅问题。 4.修复增加登陆获取住宅列表时当前住宅判空处理。 5.去掉温度按钮自定义字体。

---
 Crabtree/SmartHome/HDL/Operation/Control.cs |   41 +++++++++++++++++++++++++++++++++++++++--
 1 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/Crabtree/SmartHome/HDL/Operation/Control.cs b/Crabtree/SmartHome/HDL/Operation/Control.cs
index c30e693..d7b97c1 100644
--- a/Crabtree/SmartHome/HDL/Operation/Control.cs
+++ b/Crabtree/SmartHome/HDL/Operation/Control.cs
@@ -393,8 +393,43 @@
                     //MainPage.AddTip (Language.StringByID (SimpleControl.R.MyInternationalizationString.OperationFailed));
                 }
             }
-        }
+            return;
+            if (Shared.SimpleControl.CommonPage.IsRemote && !isLocal) {
+                System.Console.WriteLine ("杩滅▼鍙戦�佹暟鎹�:" + SendFlag);
+                SmartHome.MqttCommon.MqttRemoteSend (Packet.Bytes);
+                Packet.FlagDateTime = DateTime.Now;
+                Packet.HaveSendCount--;
+                //杩欓噷鏄噸鍙戜袱娆�
+                while (Packet.HaveSendCount < 3) {
+                    if (Packet.FlagDateTime.AddMilliseconds (1000).Ticks <= System.DateTime.Now.Ticks) {
+                        SmartHome.MqttCommon.MqttRemoteSend (Packet.Bytes);
+                        System.Console.WriteLine ("閲嶅彂杩滅▼鍙戦�佹暟鎹�:" + SendFlag);
+                        Packet.FlagDateTime = DateTime.Now;
+                        Packet.HaveSendCount++;
+                    }
+                    System.Threading.Thread.Sleep (100);
+                }鈥�                allDone.Set ();鈥�            } else {
+                try {
+                    System.Console.WriteLine ("鍙戦�佹暟鎹�:" + SendFlag);
+                    BusSocket.AsyncBeginSend (Packet);
+                    Packet.HaveSendCount--;
 
+                    //杩欓噷鏄噸鍙戜袱娆�
+                    while (Packet.HaveSendCount < 3) {
+                        if (Packet.FlagDateTime.AddMilliseconds (1000).Ticks <= System.DateTime.Now.Ticks) {
+                            System.Console.WriteLine ("閲嶅彂鏁版嵁:" + SendFlag);
+                            BusSocket.AsyncBeginSend (Packet);
+                        }
+                        System.Threading.Thread.Sleep (100);
+                    }
+
+                } catch (Exception ex) {
+                    Console.WriteLine ("managerSendCount:" + ex.ToString ());
+                } finally {
+                    allDone.Set ();
+                }
+            }
+        }
         /// <summary>
         /// 褰撳墠鏁版嵁鍖�
         /// </summary>
@@ -586,8 +621,9 @@
         /// </summary>
         /// <param name="target">鍙戦�佸璞�</param>
         /// <param name="sendCount">閲嶅彂娆℃暟</param>
-        public void Send (Target target, SendCount sendCount, bool isWait)
+        public void Send (Target target, SendCount sendCount, bool isWait, bool needLocal = false)
         {
+            isLocal = needLocal;
             Packet = new Packet (target.SendBytes, target.IPEndPoint);
             Packet.HaveSendCount = 3 - (int)sendCount;
 
@@ -597,5 +633,6 @@
                 this.wait ();
             }
         }
+        bool isLocal = false;
     }
 }
\ No newline at end of file

--
Gitblit v1.8.0