From 52005ed57f3f7bc796fdd1a878e4f298a126f1e8 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期二, 29 十月 2019 16:48:47 +0800 Subject: [PATCH] 2019.10.29-3 --- ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs | 134 +++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 124 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs index a4366b0..376a148 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs @@ -463,16 +463,129 @@ return; } - var localPic = new CategorySceneSelectImgByLocal(); - Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic); - Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; - localPic.Show(); - localPic.action = (imgPath) => + int selectRow_Height = 150; + int selectRow_Width = 1034; + var selectFL = new FrameLayout() { - IconPathType = 0; - backGround.UnSelectedImagePath = imgPath; + BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor + }; + AddChidren(selectFL); + + var itemFL = new FrameLayout() + { + Y = Application.GetRealHeight(1276), + Height = Application.GetRealHeight(450), + Width = Application.GetRealWidth(selectRow_Width), + Gravity = Gravity.CenterHorizontal, + Radius = (uint)Application.GetRealHeight(17), + BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor + }; + selectFL.AddChidren(itemFL); + itemFL.Animate = Animate.DownToUp; + + var selectLocalPicture = new Button() + { + Height = Application.GetRealHeight(selectRow_Height) - 1, + TextID = R.MyInternationalizationString.LocalPicture, + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + }; + itemFL.AddChidren(selectLocalPicture); + var selectLocalLine = new Button() + { + Y = selectLocalPicture.Bottom, + Height = 1, + BackgroundColor = ZigbeeColor.Current.GXCLineColor + }; + itemFL.AddChidren(selectLocalLine); + + var selectPhotographBtn = new Button() + { + Y = selectLocalLine.Bottom, + Height = Application.GetRealHeight(selectRow_Height) - 1, + TextID = R.MyInternationalizationString.Photograph, + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + }; + itemFL.AddChidren(selectPhotographBtn); + var selectPhotographLine = new Button() + { + Y = selectPhotographBtn.Bottom, + Height = 1, + BackgroundColor = ZigbeeColor.Current.GXCLineColor, + }; + itemFL.AddChidren(selectPhotographLine); + + var selectAblumsBtn = new Button() + { + Y = selectPhotographLine.Bottom, + Height = Application.GetRealHeight(selectRow_Height) - 1, + TextID = R.MyInternationalizationString.MyAblums, + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + }; + itemFL.AddChidren(selectAblumsBtn); + + var cancelBtn = new Button() + { + Y = Application.GetRealHeight(1742), + Height = Application.GetRealHeight(selectRow_Height), + Width = Application.GetRealWidth(selectRow_Width), + Gravity = Gravity.CenterHorizontal, + TextID = R.MyInternationalizationString.Cancel, + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, + Radius = (uint)Application.GetRealHeight(17) + }; + selectFL.AddChidren(cancelBtn); + + selectLocalPicture.MouseUpEventHandler += (send, ee) => + { + selectFL.RemoveFromParent(); + var localPic = new CategorySceneSelectImgByLocal(); + Shared.Phone.UserView.HomePage.Instance.AddChidren(localPic); + Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + localPic.Show(); + localPic.action = (imgPath) => + { + IconPathType = 0; + backGround.UnSelectedImagePath = imgPath; + }; + }; + selectPhotographBtn.MouseUpEventHandler += (send, ee) => + { + selectFL.RemoveFromParent(); + var sceneView = new SelectScene(); + UserView.HomePage.Instance.AddChidren(sceneView); + UserView.HomePage.Instance.PageIndex += 1; + sceneView.beforeSceneTargetDeviceUIs = sceneTargetDevicesList; + sceneView.Show(); + sceneView.selectedAction = (selectedScene) => + { + sceneTargetDevicesList.Add(selectedScene); + RefreshTargetListView(); + }; + + }; + selectAblumsBtn.MouseUpEventHandler += (send, ee) => + { + selectFL.RemoveFromParent(); + var delayTimeView = new SelectDelayTime(); + UserView.HomePage.Instance.AddChidren(delayTimeView); + UserView.HomePage.Instance.PageIndex += 1; + delayTimeView.Show(); + delayTimeView.selectedTimeAction = (second) => + { + sceneTargetDevicesList.Add(second); + RefreshTargetListView(); + }; }; + cancelBtn.MouseUpEventHandler += (send, ee) => + { + selectFL.RemoveFromParent(); + }; + selectFL.MouseUpEventHandler += (send, ee) => + { + selectFL.RemoveFromParent(); + }; }; backGround.MouseUpEventHandler += backGroundIMGHander; @@ -561,6 +674,7 @@ BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor }; selectFL.AddChidren(itemFL); + itemFL.Animate = Animate.DownToUp; var selectedFunctionBtn = new Button() { @@ -737,7 +851,8 @@ { } - + modifySceneUI.IconPath = backGround.UnSelectedImagePath; + CommonPage.Loading.Start(); var memberDataList = new List<ZigBee.Device.Scene.AddSceneMemberData>(); for (int i = 0; i < sceneTargetDevicesList.Count; i++) @@ -835,6 +950,7 @@ { if (modifyRoom != curRoom) { + modifyRoom.SceneUIList.Remove(modifySceneUI); modifyRoom.SceneUIFilePathList.Remove(modifySceneUI.FileName); curRoom.SceneUIList.Add(modifySceneUI); @@ -969,7 +1085,5 @@ } #endregion - - } } -- Gitblit v1.8.0