From d7ad5a3953a8cd001659092ebde204b881f94b9d Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期四, 31 十月 2019 10:47:13 +0800 Subject: [PATCH] 2019-10-31-1 --- ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 38 ++++++++++++++++++-------------------- 1 files changed, 18 insertions(+), 20 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs index 3aed5d9..5e29b1c 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs @@ -543,7 +543,7 @@ /// <param name="selectedBtn">閫変腑閭d釜鐣岄潰 0--鍔熻兘 1--鍦烘櫙 2--鑷姩鍖� </param> public void Show(int selectedBtn = 1) { - + ZbGateway.StatusList.Add(this); RemoveAll(); @@ -747,6 +747,12 @@ /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param> private void AutomationBtn_MouseUpEventHandler(object sender, MouseEventArgs mouseEventArgs) { + ///绗竴娆¤繘鏉ュ垵濮嬪寲璁惧鍒楄〃锛� + Common.Logic.LogicDviceList.Clear(); + if (Common.Logic.LogicDviceList.Count == 0) + { + Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); + } functionBtn.IsSelected = false; sceneBtn.IsSelected = false; automationBtn.IsSelected = true; @@ -1037,7 +1043,7 @@ lightControl.action = RefreshBodyView; lightControl.Show(deviceUI, room); }; - + var editBtn = new CommonForm.RowLayoutEditButton() { Tag = deviceUI, @@ -1463,13 +1469,15 @@ typeRowLayout.AddChidren(functionTypeIMG); functionTypeIMG.ClickBtn.MouseUpEventHandler += ShowSameTypeFunction; - + if (deviceType == room.DeviceUIList[0].CommonDevice.Type) { ShowSameTypeFunction(functionTypeIMG.ImageBtn, null); } } + + } } @@ -1534,7 +1542,7 @@ { RefreshFunction(room); } - + } roomBtn.MouseUpEventHandler += (sender, e) => { @@ -1555,7 +1563,7 @@ } }; } - + } #endregion @@ -1640,7 +1648,7 @@ Tag = scene }; leftFL.AddChidren(collectionBtn); - + var sceneNameBtn = new Button() { Width = Application.GetRealWidth(176), @@ -1789,7 +1797,7 @@ } }; } - + }; deleteBtn.MouseUpEventHandler += delEvent; //缂栬緫鍦烘櫙 @@ -1851,10 +1859,10 @@ /// 鑷姩鍖� /// </summary> private async void ShowAutotion() - { + { functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor; - + var bjFrameLayout = new FrameLayout { Width = Application.GetRealWidth(1080 - 58), @@ -1987,12 +1995,7 @@ } else { - Common.Logic.LogicDviceList.Clear(); - if (Common.Logic.LogicDviceList.Count == 0) - { - Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); - } - Common.Logic.CurrentLogic.LogicType = 2; + Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text; Logic.TemplatePage templatePage = new Logic.TemplatePage(); Logic.TemplatePage.s = logiciocnBtn.Tag.ToString(); @@ -2131,11 +2134,6 @@ logicRowlayout.AddRightView(edit); edit.MouseUpEventHandler += (sender, e) => { - Common.Logic.LogicDviceList.Clear(); - if (Common.Logic.LogicDviceList.Count == 0) - { - Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); - } Common.Logic.CurrentLogic = logic; var logicCommunalPage = new Logic.LogicCommunalPage(); HomePage.Instance.AddChidren(logicCommunalPage); -- Gitblit v1.8.0