From fdc47d950498e088260a3b04028703adc0f878e0 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 30 三月 2020 10:54:27 +0800 Subject: [PATCH] 2020-03-30-1 --- ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs | 47 +++++++++++++++++++++++++++++++++-------------- 1 files changed, 33 insertions(+), 14 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs old mode 100755 new mode 100644 index 03a8f3f..8f4a3b9 --- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicCommunalPage.cs @@ -22,6 +22,7 @@ { #region 鏈�涓婇潰鐨勫竷灞�浠g爜 + UserView.HomePage.Instance.ScrollEnabled = false;//閿佷綇宸︽粦 TopView view = new TopView(); this.AddChidren(view.TopRowView()); if (Common.Logic.CurrentLogic.LogicId != 0) @@ -127,6 +128,9 @@ { SelectedDeviceView selecteddevice = new SelectedDeviceView(); selecteddevice.Show(middle); + selecteddevice.stateRow.AddRightView(selecteddevice.edit); + selecteddevice.stateRow.AddRightView(selecteddevice.del); + var Type = int.Parse(ListConditions[i]["Type"]); var conditions = ListConditions[i]; switch (Type) @@ -150,7 +154,7 @@ { if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"]) { - selecteddevice.selecetddevicestateBtn.Text = Common.Logic.CurrentLogic.Accounts[a]["Account"]; + selecteddevice.selecetddevicestateBtn.Text = Common.Logic.CurrentLogic.Accounts[a]["AccountName"]; break; } } @@ -201,10 +205,7 @@ addactionview.clickBtn.MouseUpEventHandler += (sender, e) => { Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim(); - var addAction = new AddAction(); - UserView.HomePage.Instance.AddChidren(addAction); - UserView.HomePage.Instance.PageIndex += 1; - addAction.Show(); + Method.View(LogicView.IfString.Action_LockAction, LogicView.IfString.Action_LockScene); }; List<Dictionary<string, object>> ListActions = new List<Dictionary<string, object>>(); @@ -218,15 +219,12 @@ { LogicView.AddDeviceView addflview = new LogicView.AddDeviceView(); - addflview.titleBtn.TextID = MyInternationalizationString.selectunlockingmode; + addflview.titleBtn.TextID = MyInternationalizationString.addaction; middle.AddChidren(addflview.AddFl()); addflview.clickBtn.MouseUpEventHandler += (sender, e) => { Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim(); - var addAction = new AddAction(); - UserView.HomePage.Instance.AddChidren(addAction); - UserView.HomePage.Instance.PageIndex += 1; - addAction.Show(); + Method.View(LogicView.IfString.Action_LockAction, LogicView.IfString.Action_LockScene); }; } else @@ -241,7 +239,9 @@ string state = ""; switch (linkType) { + case 0: + case 8: { var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); @@ -489,6 +489,20 @@ } } break; + case DeviceType.DoorLock: + { + //闂ㄩ攣鐗规畩 + icon = "ZigeeLogic/doorlock.png"; + if (actions["PassData"].ToString() == "055704010112") + { + state = Language.StringByID(MyInternationalizationString.logicopen); + } + else + { + state = Language.StringByID(MyInternationalizationString.logicclose); + } + } + break; } @@ -496,7 +510,8 @@ } break; case 2: - { + { + actiondevice.edit.Visible = false;//闅愯棌缂栬緫鎸夐挳(鍦烘櫙涓嶉渶瑕佺紪杈�) //鍦ㄦ湰鍦版煡鎵捐鍦烘櫙; var sceneinof = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString())); //鏈湴娌℃湁瀛樺湪; @@ -531,7 +546,11 @@ } break; } - + if (linkType != 2) + { + actiondevice.stateRow.AddRightView(actiondevice.edit); + } + actiondevice.stateRow.AddRightView(actiondevice.del); //鐘舵�� actiondevice.deviceNameBtn.Visible = true; actiondevice.deviceNameBtn.Text = name; @@ -544,6 +563,7 @@ switch (linkType) { case 0: + case 8: { var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; @@ -583,7 +603,6 @@ Method.Push(middle); #endregion - saveBtn.clickviewBtn.MouseUpEventHandler += (sender, e) => { var name = logicTextBox.Text.Trim(); @@ -593,12 +612,12 @@ } public void AddCondition(int value) { + Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim(); var addCondition = new AddCondition(); addCondition.conditionsIndex = value; UserView.HomePage.Instance.AddChidren(addCondition); UserView.HomePage.Instance.PageIndex += 1; addCondition.Show(); - } } } -- Gitblit v1.8.0