From 23fb45dd846ed8b62304c408c6bbe64265d4ac8b Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 20 十二月 2019 18:57:16 +0800 Subject: [PATCH] 代码合并 --- ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 60 ++++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 38 insertions(+), 22 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs index be44d89..a8167b2 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs @@ -18,7 +18,7 @@ Tag = "Logic"; } EditText logicTextBox; - public void Show(Action action) + public async void Show(Action action) { #region 鏈�涓婇潰鐨勫竷灞�浠g爜 @@ -497,7 +497,8 @@ var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return obj.DeviceAddr == conditions["MacAddr"] && obj.DeviceEpoint.ToString() == conditions["Epoint"]; }); if (deviceinof == null) { - continue; + deviceinof = new ZigBee.Device.CommonDevice(); + //continue; } ///鏄剧ず璁惧鍚嶇О var btndevice = new Button @@ -1195,9 +1196,11 @@ var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return ((obj.DeviceAddr == obj1) && (obj.DeviceEpoint.ToString() == obj2)); }); if (deviceinof == null) { - continue; + + deviceinof = new ZigBee.Device.CommonDevice(); + // continue; } - + ///璁惧鍚嶇ОButton var btndevicename = new Button { @@ -1503,11 +1506,25 @@ break; case 2: { - + //鍦ㄦ湰鍦版煡鎵捐鍦烘櫙; var sceneinof = Common.Room.AllRoomSceneUIList.Find((obj) => { return obj.Id.ToString() == actions["DeviceAddr"].ToString(); }); + //鏈湴娌℃湁瀛樺湪; if (sceneinof == null) { - continue; + //鍦ㄧ綉鍏虫煡鎵捐鍦烘櫙; + sceneinof =await Send.GetScene(int.Parse(actions["DeviceAddr"].ToString())); + //缃戝叧娌℃湁瀛樺湪; + if (sceneinof == null) + { + + //娉ㄨВ:鏈湴鍜岀綉鍏抽兘涓嶅瓨鍦ㄨ鍦烘櫙,鐣岄潰灏嗕笉浼氭樉绀鸿鍦烘櫙; + //sceneinof = new SceneUI(); + //绉婚櫎璇ュ満鏅暟鎹�; + Common.Logic.CurrentLogic.Actions.Remove(actions); + //绉婚櫎璇ュ満鏅鍥�; + devicesFrameLayout.RemoveFromParent(); + continue; + } } actionsIcon.UnSelectedImagePath = "ZigeeLogic/scene.png"; @@ -1539,7 +1556,6 @@ Common.Room room = new Common.Room(); btnregionname.Text = room.GetRoomNameBySceneId(sceneinof.Id); //Send.RoomNmae(btnregionname, deviceinof); - } @@ -1752,6 +1768,7 @@ if (e1) { Common.Logic.CurrentLogic.Actions.Remove(actions); + // devicesFrameLayout.RemoveFromParent(); var logicCommunalPage = new LogicCommunalPage(); UserView.HomePage.Instance.AddChidren(logicCommunalPage); UserView.HomePage.Instance.PageIndex += 1; @@ -1888,23 +1905,11 @@ Gravity = Gravity.CenterVertical, }; pushswitchRowlayout.AddChidren(btnswitch); - btnswitch.MouseUpEventHandler += (sender1, e1) => - { - btnswitch.IsSelected = !btnswitch.IsSelected; - if (btnswitch.IsSelected) - { - - } - else - { - - } - }; var custompushFrameLayout = new FrameLayout { - Height = Application.GetRealHeight(160), + Height = Application.GetRealHeight(0), BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, }; middle.AddChidren(custompushFrameLayout); @@ -1952,7 +1957,18 @@ btncustompush.MouseUpEventHandler += customclick; custompushback.MouseUpEventHandler += customclick; custompushRowLayout.MouseUpEventHandler += customclick; - + btnswitch.MouseUpEventHandler += (sender1, e1) => + { + btnswitch.IsSelected = !btnswitch.IsSelected; + if (btnswitch.IsSelected) + { + custompushFrameLayout.Height = Application.GetRealHeight(160); + } + else + { + custompushFrameLayout.Height = Application.GetRealHeight(0); + } + }; #endregion @@ -2523,7 +2539,7 @@ } /// <summary> - /// 闂幇鎻愮ず妗嗙殑鏂规硶 + /// 闂幇寮忔彁绀烘鐨勬柟娉� /// </summary> /// <param name="tipText">鎻愮ず鍐呭</param> /// <param name="second">鍋滅暀鏃堕棿鍗曚綅涓簊</param> -- Gitblit v1.8.0