From ddb46a700775aacfb6cc82d9586302a38c8fa0a7 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期一, 23 十二月 2019 09:13:37 +0800 Subject: [PATCH] 2019.12.23 --- ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs | 98 ++++++++++++++++++++++++++++++------------------- 1 files changed, 60 insertions(+), 38 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs index 5d270db..27134cf 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs @@ -36,7 +36,7 @@ /// </summary> private string ImagePath="SceneIcon/1.png"; /// <summary> - /// 鍥剧墖鏉ユ簮 0--鏈湴鍥惧簱 1--鎷嶇収 2--绯荤粺鍥惧簱 + /// 鍥剧墖鏉ユ簮 0--鏈湴鍥惧簱 1--鎷嶇収 2--绯荤粺鍥惧簱 /// </summary> public int IconPathType = 0; /// <summary> @@ -159,7 +159,7 @@ targetRow.SetNameText(devNameText); targetRow.SetZoneText(targetDevice.SceneUI.GetZone()); } - + var editBtn = new Button() { BackgroundColor = ZigbeeColor.Current.GXCEditBackGroundColor, @@ -236,6 +236,7 @@ UserView.HomePage.Instance.PageIndex += 1; sceneView.sceneTargetDevice = targetDevice; sceneView.sceneUI = targetDevice.SceneUI; + sceneView.currentSceneUI = modifySceneUI; sceneView.Show(); sceneView.selectedAction = (selectedScene) => { @@ -250,8 +251,17 @@ }; } } + } - + if (sceneTargetDevicesList.Count > 2) + { + var targetRowLayout = new RowLayout() + { + Height = Application.GetRealHeight(300), + LineColor = ZigbeeColor.Current.GXCBackgroundColor, + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + TargetListScrolView.AddChidren(targetRowLayout); } } } @@ -275,7 +285,7 @@ /// </summary> private void Init() { - + } /// <summary> @@ -347,7 +357,8 @@ TextID = R.MyInternationalizationString.EditInfo, TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor, TextAlignment = TextAlignment.CenterLeft, - TextSize = 14 + TextSize = 15, + IsBold=true }; infoFL.AddChidren(infoEdit); @@ -394,7 +405,8 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextID = R.MyInternationalizationString.AddScentTargetAction, - Gravity = Gravity.CenterVertical + Gravity = Gravity.CenterVertical, + TextSize=15 }; addTargetFL.AddChidren(target); @@ -474,24 +486,25 @@ Height = Application.GetRealHeight(450), Width = Application.GetRealWidth(selectRow_Width), Gravity = Gravity.CenterHorizontal, - Radius = (uint)Application.GetRealHeight(17), + Radius = (uint)Application.GetRealHeight(35), BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor }; selectFL.AddChidren(itemFL); - itemFL.Animate = Animate.DownToUp; + //itemFL.Animate = Animate.DownToUp; var selectLocalPicture = new Button() { Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.LocalPicture, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectLocalPicture); var selectLocalLine = new Button() { Y = selectLocalPicture.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2 }; itemFL.AddChidren(selectLocalLine); @@ -500,14 +513,15 @@ Y = selectLocalLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Photograph, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectPhotographBtn); var selectPhotographLine = new Button() { Y = selectPhotographBtn.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor, + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, }; itemFL.AddChidren(selectPhotographLine); @@ -516,7 +530,8 @@ Y = selectPhotographLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.MyAblums, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectAblumsBtn); @@ -529,7 +544,8 @@ TextID = R.MyInternationalizationString.Cancel, TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, - Radius = (uint)Application.GetRealHeight(17) + Radius = (uint)Application.GetRealHeight(35), + TextSize=17 }; selectFL.AddChidren(cancelBtn); @@ -567,10 +583,10 @@ backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath); backGround.ImagePath = imagePath; System.IO.File.Delete(imagePath); - + }, fileName, 2, 1); }; - + selectAblumsBtn.MouseUpEventHandler += (send, ee) => { selectFL.RemoveFromParent(); @@ -631,7 +647,7 @@ { curRoom = rooms[index1][index2]; zoneRow.SetTitle($"{Config.Instance.Home.GetFloorNameById(floorIds[index1])} , {rooms[index1][index2].Name}"); - }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor), + }, 0, 0, Language.StringByID(R.MyInternationalizationString.BelongZone), Language.StringByID(R.MyInternationalizationString.Confrim), Language.StringByID(R.MyInternationalizationString.Cancel)); } @@ -651,7 +667,7 @@ { curRoom = rs[index1]; zoneRow.SetTitle(rs[index1].Name); - }, 0, Language.StringByID(R.MyInternationalizationString.BelongFloor), + }, 0, Language.StringByID(R.MyInternationalizationString.BelongZone), Language.StringByID(R.MyInternationalizationString.Confrim), Language.StringByID(R.MyInternationalizationString.Cancel)); } @@ -662,15 +678,18 @@ EventHandler<MouseEventArgs> targetAddHander = (sender, e) => { - if (curRoom == null) + //if (curRoom == null) + //{ + // RoomCommon.ShowTipNoRoom(); + // return; + //} + if(curRoom != null) { - RoomCommon.ShowTipNoRoom(); - return; - } - if (curRoom.IsSharedRoom) - { - RoomCommon.ShowTipRoomIsShared(); - return; + if (curRoom.IsSharedRoom) + { + RoomCommon.ShowTipRoomIsShared(); + return; + } } int selectRow_Height = 150; @@ -687,24 +706,25 @@ Height = Application.GetRealHeight(450), Width = Application.GetRealWidth(selectRow_Width), Gravity=Gravity.CenterHorizontal, - Radius = (uint)Application.GetRealHeight(17), + Radius = (uint)Application.GetRealHeight(35), BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor }; selectFL.AddChidren(itemFL); - itemFL.Animate = Animate.DownToUp; + //itemFL.Animate = Animate.DownToUp; var selectedFunctionBtn = new Button() { Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Function, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectedFunctionBtn); var selectedFunctionLine = new Button() { Y = selectedFunctionBtn.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2 }; itemFL.AddChidren(selectedFunctionLine); @@ -713,14 +733,15 @@ Y = selectedFunctionLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Scence, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectedSceneBtn); var selectedSceneLine = new Button() { Y = selectedSceneBtn.Bottom, Height = 1, - BackgroundColor = ZigbeeColor.Current.GXCLineColor, + BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor2, }; itemFL.AddChidren(selectedSceneLine); @@ -729,7 +750,8 @@ Y = selectedSceneLine.Bottom, Height = Application.GetRealHeight(selectRow_Height) - 1, TextID = R.MyInternationalizationString.Delay, - TextColor = ZigbeeColor.Current.GXCTextSelectedColor4 + TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, + TextSize=17 }; itemFL.AddChidren(selectedTimerBtn); @@ -743,7 +765,8 @@ TextID = R.MyInternationalizationString.Cancel, TextColor = ZigbeeColor.Current.GXCTextSelectedColor4, BackgroundColor = ZigbeeColor.Current.GXCTextWhiteColor, - Radius = (uint)Application.GetRealHeight(17) + Radius = (uint)Application.GetRealHeight(35), + TextSize=17 }; selectFL.AddChidren(cancelBtn); @@ -770,13 +793,14 @@ UserView.HomePage.Instance.AddChidren(sceneView); UserView.HomePage.Instance.PageIndex += 1; sceneView.beforeSceneTargetDeviceUIs = sceneTargetDevicesList; + sceneView.currentSceneUI = modifySceneUI; sceneView.Show(); sceneView.selectedAction = (selectedScene) => { sceneTargetDevicesList.Add(selectedScene); RefreshTargetListView(); }; - + }; //娣诲姞鏃堕棿闂撮殧 selectedTimerBtn.MouseUpEventHandler += (send, ee) => @@ -841,7 +865,7 @@ { if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null) { - Common.CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.TheSceneHadExist); + CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneHadExist)); return; } var r = await ZigBee.Device.Scene.RenameSceneAsync(modifySceneUI.Id, nameRow.NameText.Text.Trim()); @@ -972,7 +996,6 @@ { if (modifyRoom != curRoom) { - modifyRoom.SceneUIList.Remove(modifySceneUI); modifyRoom.SceneUIFilePathList.Remove(modifySceneUI.FileName); curRoom.SceneUIList.Add(modifySceneUI); @@ -1109,7 +1132,6 @@ } } - }; #endregion } -- Gitblit v1.8.0