From 94e4e5b9fd3da964c44b7b14227d6fe2bbb426d7 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期四, 02 四月 2020 13:56:39 +0800 Subject: [PATCH] 2020-04-02-2 --- ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 75 ++++++++++--------------------------- 1 files changed, 20 insertions(+), 55 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs index 385d1e0..35f9b0f 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs @@ -101,7 +101,7 @@ addconditionview.iconBtn.Visible = true; addconditionview.titleBtn.TextID = MyInternationalizationString.ifcondition; middle.AddChidren(addconditionview.AddDeviceView()); - + ///娣诲姞鏉′欢鐨勭偣鍑讳簨浠� addconditionview.clickBtn.MouseUpEventHandler+= (sender, e) => { @@ -162,6 +162,7 @@ LogicView.AddDeviceView addflview = new LogicView.AddDeviceView(); addflview.titleBtn.TextID = MyInternationalizationString.addconditions; middle.AddChidren(addflview.AddFl()); + addflview.clickBtn.MouseUpEventHandler += (sender, e) => { if (Common.Logic.CurrentLogic.Conditions.Count == 1) @@ -280,7 +281,7 @@ case 1: { var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]); - name = deviceinof.DeviceEpointName; + name = LocalDevice.Current.GetDeviceEpointName(deviceinof); selecteddevice.regionNameBtn.Visible = true; Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof); @@ -660,10 +661,11 @@ alert.ConfirmClickEvent += () => { Common.Logic.CurrentLogic.Conditions.Remove(conditions); - var logicCommunalPage = new LogicCommunalPage(); - UserView.HomePage.Instance.AddChidren(logicCommunalPage); - UserView.HomePage.Instance.PageIndex += 1; - logicCommunalPage.Show(() => { }); + selecteddevice.selecetdFrameLayout.RemoveFromParent(); + //var logicCommunalPage = new LogicCommunalPage(); + //UserView.HomePage.Instance.AddChidren(logicCommunalPage); + //UserView.HomePage.Instance.PageIndex += 1; + //logicCommunalPage.Show(() => { }); }; }; @@ -680,6 +682,7 @@ addactionview.iconBtn.Visible = true; addactionview.titleBtn.TextID = MyInternationalizationString.execute; middle.AddChidren(addactionview.AddDeviceView()); + addactionview.clickBtn.MouseUpEventHandler+= (sender, e) => { @@ -692,6 +695,8 @@ ListActions.AddRange(Common.Logic.CurrentLogic.Actions); ListActions.Add(new Dictionary<string, object>()); + + for (int i = 0; i < ListActions.Count; i++) { if (i == (ListActions.Count - 1)) @@ -700,6 +705,8 @@ LogicView.AddDeviceView addflview = new LogicView.AddDeviceView(); addflview.titleBtn.TextID = MyInternationalizationString.addfunction; middle.AddChidren(addflview.AddFl()); + + addflview.clickBtn.MouseUpEventHandler += (sender, e) => { Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim(); @@ -724,7 +731,7 @@ { var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString()); - name = deviceinof.DeviceEpointName; + name = LocalDevice.Current.GetDeviceEpointName(deviceinof); actiondevice.regionNameBtn.Visible = true; Method.RoomNmae(actiondevice.regionNameBtn, deviceinof); switch (deviceinof.Type) @@ -1151,11 +1158,12 @@ alert.ConfirmClickEvent += () => { Common.Logic.CurrentLogic.Actions.Remove(actions); + actiondevice.selecetdFrameLayout.RemoveFromParent(); // devicesFrameLayout.RemoveFromParent(); - var logicCommunalPage = new LogicCommunalPage(); - UserView.HomePage.Instance.AddChidren(logicCommunalPage); - UserView.HomePage.Instance.PageIndex += 1; - logicCommunalPage.Show(() => { }); + //var logicCommunalPage = new LogicCommunalPage(); + //UserView.HomePage.Instance.AddChidren(logicCommunalPage); + //UserView.HomePage.Instance.PageIndex += 1; + //logicCommunalPage.Show(() => { }); }; }; @@ -1324,50 +1332,7 @@ }; } - /// <summary> - /// 闂幇寮忔彁绀烘鐨勬柟娉� - /// </summary> - /// <param name="tipText">鎻愮ず鍐呭</param> - /// <param name="second">鍋滅暀鏃堕棿鍗曚綅涓簊</param> - public void TipView(string tipText, int second = 1) - { - - var frameLayout = new FrameLayout { BackgroundColor = 0x50000000 }; - this.AddChidren(frameLayout); - - var btn = new Button - { - Gravity = Gravity.Center, - Text = tipText, - BackgroundColor = 0xff1f1f1f, - Width = Application.GetRealWidth(500), - Height = Application.GetRealHeight(100), - Radius = (uint)Application.GetRealHeight(50), - }; - frameLayout.AddChidren(btn); - - var dateTime1 = DateTime.Now; - new System.Threading.Thread(() => - { - Application.RunOnMainThread(() => - { - while (true) - { - if ((DateTime.Now - dateTime1).TotalMilliseconds > second * 1000) - { - //榛樿涓�绉掑叧闂� - frameLayout.RemoveFromParent(); - break; - } - } - }); - }) - { IsBackground = true }.Start(); - - } - - - + } } -- Gitblit v1.8.0