From c7f2e3791f931d18c6ab3b1b215e57a1101e0389 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期四, 27 八月 2020 15:01:27 +0800 Subject: [PATCH] 2020-08-27-1 --- ZigbeeApp/Shared/Phone/Device/Logic/Method.cs | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 43 insertions(+), 2 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs index 9629046..560bd30 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs @@ -46,7 +46,7 @@ { ///鍖哄垎鍑鸿緭鍏ユ潯浠跺拰杈撳嚭鐩爣璁惧 var listdevicetype = GetDevice(type); - var listdevice = GetDeviceUIList(listAllRoom[i], listdevicetype); + var listdevice = GetDeviceUIList(listAllRoom[i], listdevicetype, type); if (listdevice.Count == 0) { ///杩囨护鎺夋病鏈夎澶囩殑鎴块棿 @@ -68,8 +68,9 @@ /// </summary> /// <param name="room">褰撳墠鎴块棿</param> /// <param name="deviceTypelist">璁惧绫诲瀷</param> + /// /// <param name="type">閫昏緫绫诲瀷</param> /// <returns></returns> - public static List<CommonDevice> GetDeviceUIList(Common.Room room, List<DeviceType> deviceTypelist) + public static List<CommonDevice> GetDeviceUIList(Common.Room room, List<DeviceType> deviceTypelist,string type) { var deviceUIlist = new List<CommonDevice>(); foreach (var deviceKey in room.ListDevice) @@ -92,6 +93,22 @@ //鏆傛椂涓嶆敮鎸丼-one闂ㄩ攣; //杩囨护鎺変笉鏀寔S-one闂ㄩ攣璁惧; continue; + } + } + if (type == "condition_mould") + { + if (device.Type == DeviceType.IASZone) + { + if (device.IasDeviceType != 13) + {//鑷姩鍖栨ā鏉垮彧鏀寔绾㈠浼犳劅鍣� + continue; + } + if (device.ModelIdentifier == "MSPIRB-ZB.10") + { + //鑷姩鍖栨ā鏉夸笉鏀寔鍏夌収搴� + continue; + } + } } deviceUIlist.Add(device); @@ -884,6 +901,30 @@ UserView.HomePage.Instance.RemoveViewByTag("Logic");//绉婚櫎鎵�鏈夋爣璁癓ogic鐣岄潰 if (LogicView.IfString._Logic == if_logic) { + //鏌ヨ閫昏緫鏄惁娣诲姞鍦扮悊浣嶇疆浣滀负鏉′欢 + var exist = Common.Logic.CurrentLogic.Conditions.Find((obj) => obj["Type"] == "7"); + if (exist==null) + { + //濡傛灉鎵句笉鍒板湴鐞嗕綅缃綔涓烘潯浠剁殑璇�,鍏抽棴GPS鏈嶅姟(鍑忓皯鑰楃數) + if (Send.It_Exist == "1") + { + //鍏抽棴GPS鏈嶅姟 + Application.StopGPSLocationService(); + //淇濆瓨GPS鏈嶅姟鍏抽棴鐘舵�� + Send.SaveLocalFile("GPS_File", "0"); + } + } + else + { + if (Send.It_Exist == "0") + { + + //寮�鍚疓PS鏈嶅姟 + Application.StartGPSLocationService(); + //淇濆瓨GPS鏈嶅姟寮�鍚姸鎬� + Send.SaveLocalFile("GPS_File", "1"); + } + } //鍙埛鏂板垎绫�-鑷姩鍖栦笂涓嬫粦鍔╲iew锛� Phone.Category.CategoryMainForm.instance?.RefreshBodyView(); // Category.Category.instance?.RefreshBodyView(); -- Gitblit v1.8.0