From 1f6f024bddf48dea1c17c54ade1535a10ef7b39b Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 23 三月 2020 17:16:37 +0800 Subject: [PATCH] 2020-03-23-2 --- ZigbeeApp/Shared/Phone/Device/Logic/Method.cs | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs old mode 100755 new mode 100644 index db4d658..16cbc62 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs @@ -91,14 +91,13 @@ /// <summary> /// 鎺掑垪鎵�鏈夎澶囩被鍨嬬殑鍒楄〃 /// </summary> - /// <param name="type">鍒ゆ柇瀛楃涓�</param> /// <param name="devicelist">璁惧鍒楄〃</param> /// <returns></returns> - public static List<string> GetDeviceTypeList(string type, List<CommonDevice> devicelist) + public static List<string> GetDeviceTypeList(List<CommonDevice> devicelist) { List<string> devicetypelist = new List<string>(); devicetypelist.Clear(); - var lightjosn = devicelist.Find((device) => device.Type == DeviceType.ColorDimmableLight || device.Type == DeviceType.OnOffOutput); + var lightjosn = devicelist.Find((device) => device.Type == DeviceType.DimmableLight || device.Type == DeviceType.OnOffOutput); if (lightjosn != null) { devicetypelist.Add(Language.StringByID(MyInternationalizationString.Lights)); @@ -326,12 +325,16 @@ } break; case "action_logic": - { //鑷姩鍖栨敮鎸佺殑鐩爣璁惧 + { + + //鑷姩鍖栨敮鎸佺殑鐩爣璁惧 deviceTypeList.Add(DeviceType.OnOffOutput); deviceTypeList.Add(DeviceType.DimmableLight); deviceTypeList.Add(DeviceType.WindowCoveringDevice); deviceTypeList.Add(DeviceType.Thermostat); deviceTypeList.Add(DeviceType.AirSwitch); + ///闂ㄩ攣鐗规畩 + deviceTypeList.Add(DeviceType.DoorLock); } break; case "condition_mould": @@ -352,6 +355,8 @@ deviceTypeList.Add(DeviceType.WindowCoveringDevice); deviceTypeList.Add(DeviceType.Thermostat); deviceTypeList.Add(DeviceType.AirSwitch); + ///闂ㄩ攣鐗规畩 + deviceTypeList.Add(DeviceType.DoorLock); } break; @@ -649,6 +654,7 @@ custompushview.iconBtn.Visible = true; custompushview.iconBtn.UnSelectedImagePath = "ZigeeLogic/next.png"; custompushview.titleBtn.TextID = MyInternationalizationString.custompush; + custompushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; middle.AddChidren(custompushview.AddDeviceView()); EventHandler<MouseEventArgs> customclick = (sender, e) => @@ -669,6 +675,7 @@ LogicView.IfString.Tag = true; custompushview.frameLayout.Height = Application.GetRealHeight(160); Common.Logic.CurrentLogic.LogicIsCustomPushText = 1; + pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor; } else @@ -676,6 +683,7 @@ LogicView.IfString.Tag = false; custompushview.frameLayout.Height = Application.GetRealHeight(0); Common.Logic.CurrentLogic.LogicIsCustomPushText = 0; + pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; } Send.Zj(LogicView.IfString.Tag, Common.Logic.CurrentLogic); }; @@ -685,12 +693,14 @@ LogicView.IfString.Tag = false; pushview.switchBtn.IsSelected = false; custompushview.frameLayout.Height = Application.GetRealHeight(0); + pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; } else { LogicView.IfString.Tag = true; pushview.switchBtn.IsSelected = true; custompushview.frameLayout.Height = Application.GetRealHeight(160); + pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor; } } /// <summary> @@ -769,6 +779,17 @@ } } - + /// <summary> + /// 璺冲叆杈撳嚭鐩爣鍔熻兘鐣岄潰鐨勬柟娉� + /// </summary> + /// <param name="str1">璁惧鐣岄潰璇嗗埆瀛楃涓�</param> + /// <param name="str2">鍦烘櫙鐣岄潰璇嗗埆瀛楃涓�</param> + public static void View(string str1, string str2) + { + var deviceTarget = new DeviceTarget(); + UserView.HomePage.Instance.AddChidren(deviceTarget); + UserView.HomePage.Instance.PageIndex += 1; + deviceTarget.Show(str1, str2); + } } } -- Gitblit v1.8.0