From 7232642ff48a7fbde2018cde652f3e771fa58025 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 27 一月 2021 14:32:55 +0800 Subject: [PATCH] 20200127-英文版处理 --- HDL_ON/DAL/DriverLayer/Control.cs | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index 861a54d..84a426e 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -1,4 +1,4 @@ -using System; +锘縰sing System; using System.Collections.Generic; using System.Text; using HDL_ON.Entity; @@ -86,6 +86,10 @@ { if (IsRemote)//濡傛灉鏄繙绋� { + if(DB_ResidenceData.Instance.HomeGateway == null) + { + return; + } if (!DB_ResidenceData.Instance.HomeGateway.gatewayStatus)//杩滅▼鎯呭喌涓嬶紝缃戝叧鏈摼鎺ユ湇鍔″櫒涓嶈兘淇敼涓婚〉缃戝叧鐘舵�� { new System.Threading.Thread(() => { @@ -188,6 +192,11 @@ /// </summary> public void SearchLoaclGateway() { + //2021-01-15 : 浣忓畢娌℃湁缁戝畾缃戝叧鐨勬椂鍊欎笉鐢ㄦ悳绱紝骞朵笖涓嶈兘閾炬帴mqtt + if(DB_ResidenceData.Instance.HomeGateway == null) + { + return; + } var ggg = DB_ResidenceData.Instance.GatewayType == 0 ? "涓�绔彛" : "A缃戝叧"; var ggg1 = MainPage.InternetStatus == 1 ? "4G" : "wifi"; MainPage.Log($"鎼滅储缃戝叧鍒楄〃锛岀綉鍏崇被鍨�:{ggg};缃戠粶绫诲瀷:{ggg1}"); @@ -342,14 +351,14 @@ public void SwtichFunctions(bool open,List<Function> functions) { var count = 0; - var logString = open ? "鎵撳紑" : "鍏抽棴"; + var logString = open ? "鎵撳紑\r\n" : "鍏抽棴\r\n"; List<ApiAlinkControlActionObj> actionObjs = new List<ApiAlinkControlActionObj>(); Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, open ? "on" : "off"); var pm = new DAL.Server.HttpServerRequest(); foreach (var temp in functions) { - logString += temp.spk + ":" + temp.sid; + logString += temp.spk + ":" + temp.sid + "\r\n"; var apiControlData = temp.GetApiControlData(d); actionObjs.Add(apiControlData); count++; @@ -442,8 +451,16 @@ { if (Ins.IsRemote) { - var pm = new DAL.Server.HttpServerRequest(); - var result = pm.ExecuteScene(scene.userSceneId); + //浜戠鍋氬鐞嗗彂閫佷竴绔彛鍦烘櫙 + //if (DB_ResidenceData.Instance.GatewayType == 0) + //{ + // new Control_Udp().ControlBusScenes(scene); + //} + //else + { + var pm = new DAL.Server.HttpServerRequest(); + var result = pm.ExecuteScene(scene.userSceneId); + } } else { -- Gitblit v1.8.0