From a5b3c4bae726ef6770d4bfcbf2f4b50a37ed4a15 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 06 三月 2020 15:31:36 +0800 Subject: [PATCH] 删除了郭雪城的 DeviceUi 这个类 --- ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs | 57 +++++++++++++++++++++++++++++++++------------------------ 1 files changed, 33 insertions(+), 24 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs index 7fe0130..9ddb9df 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs @@ -39,7 +39,7 @@ X = Application.GetRealWidth(x); Y = Application.GetRealHeight(y); Width = Application.GetRealWidth(1080); - Height = Application.GetRealHeight(446); + Height = Application.GetRealHeight(397 + 46); BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor; } @@ -63,10 +63,9 @@ RemoveAll(); var sceneRowLayout = new RowLayout { - Y = Application.GetRealHeight(46), - Height = Application.GetRealHeight(446 - 46), + Height = Application.GetRealHeight(440), LineColor = ZigbeeColor.Current.GXCGrayBackgroundColor, - Tag= scene + Tag = scene }; AddChidren(sceneRowLayout); sceneRowLayout.SubViewWidth = Application.GetRealWidth(199); @@ -75,12 +74,16 @@ { X = Application.GetRealWidth(179), Width = Application.GetRealWidth(844), - Height = Application.GetRealHeight(400), + Height = Application.GetRealHeight(397), ImagePath = scene.IconPathType == 0 ? scene.IconPath : System.IO.Path.Combine(Config.Instance.FullPath, scene.IconPath), Radius = (uint)Application.GetRealHeight(17) }; - sceneRowLayout.AddChidren(sceneImg); - //sceneImg.SetViewShadow(true); + sceneRowLayout.AddChidren(sceneImg); + //闃村奖 + var btnShadow = new PicViewControl(sceneImg.Width + Application.GetRealWidth(14 * 2), sceneImg.Height + Application.GetRealHeight(43), false); + btnShadow.X = sceneImg.X - Application.GetRealWidth(14); + btnShadow.UnSelectedImagePath = "Scene/SceneShadow.png"; + sceneRowLayout.AddChidren(btnShadow); var leftFL = new FrameLayout { @@ -88,7 +91,7 @@ Y = Application.GetRealHeight(58), Width = Application.GetRealWidth(251), Height = Application.GetRealHeight(282), - BackgroundColor = ZigbeeColor.Current.GXCBlackBackgroundColor2, + BackgroundColor = 0xd6333333, Radius = (uint)Application.GetRealHeight(17) }; sceneRowLayout.AddChidren(leftFL); @@ -101,7 +104,7 @@ Height = Application.GetMinRealAverage(65), UnSelectedImagePath = "Item/Collection.png", SelectedImagePath = "Item/CollectionSelected.png", - IsSelected = Common.Room.CurrentRoom.GetLoveRoom().SceneUIFilePathList.Contains(scene.FileName), + IsSelected = HdlRoomLogic.Current.IsCollectInRoom(scene), Tag = scene }; leftFL.AddChidren(collectionBtn); @@ -126,19 +129,19 @@ { if (room.IsLove) { - Common.Room.CurrentRoom.GetLoveRoom().DeleteScene(scene); + HdlSceneLogic.Current.DeleteScene(HdlRoomLogic.Current.GetLoveRoom(), scene); RemoveViewByTag(collectionBtn.Tag); } else { collectionBtn.IsSelected = !collectionBtn.IsSelected; if (collectionBtn.IsSelected) - { - Common.Room.CurrentRoom.GetLoveRoom().AddScene(scene); + { + HdlSceneLogic.Current.AddScene(HdlRoomLogic.Current.GetLoveRoom(), scene); } else { - Common.Room.CurrentRoom.GetLoveRoom().DeleteScene(scene); + HdlSceneLogic.Current.DeleteScene(HdlRoomLogic.Current.GetLoveRoom(), scene); } } }; @@ -174,7 +177,9 @@ BackgroundColor=ZigbeeColor.Current.GXCTextSelectedColor, }; delayBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight | HDLUtils.RectCornerBottomRight); - sceneRowLayout.AddLeftView(delayBtn); + sceneRowLayout.AddLeftView(delayBtn); + //鍙樻洿鎸夐挳鐨勯珮搴� + delayBtn.Height = sceneImg.Height; //缂栬緫 var settingBtn = new Device.CommonForm.RowLayoutEditButton() { @@ -196,13 +201,17 @@ { if (room.IsLove) { - sceneRowLayout.AddRightView(deleteBtn); + sceneRowLayout.AddRightView(deleteBtn); + //鍙樻洿鎸夐挳鐨勯珮搴� + deleteBtn.Height = sceneImg.Height; } else { sceneRowLayout.AddRightView(settingBtn); - sceneRowLayout.AddRightView(deleteBtn); - + sceneRowLayout.AddRightView(deleteBtn); + //鍙樻洿鎸夐挳鐨勯珮搴� + settingBtn.Height = sceneImg.Height; + deleteBtn.Height = sceneImg.Height; } } @@ -211,7 +220,7 @@ { if (room.IsLove) { - Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteScene(scene); + HdlSceneLogic.Current.DeleteScene(HdlRoomLogic.Current.GetLoveRoom(), scene); RemoveFromParent(); } else @@ -230,7 +239,7 @@ //1鎴愬姛 if (removeSceneAllData.removeSceneData.Result == 1) { - room.RemoveScene(scene); + HdlSceneLogic.Current.RemoveScene(scene); //RefreshBodyView(); RemoveFromParent(); } @@ -242,8 +251,8 @@ } //2 娌℃湁璇ュ満鏅� else if (removeSceneAllData.removeSceneData.Result == 2) - { - room.RemoveScene(scene); + { + HdlSceneLogic.Current.RemoveScene(scene); //RefreshBodyView(); RemoveFromParent(); CommonFormResouce.ShowTip(Language.StringByID(R.MyInternationalizationString.TheSceneIsNull)); @@ -271,8 +280,8 @@ if (sceneDeviceList.getSceneDeviceListInfo != null) { var deviceList = sceneDeviceList.getSceneDeviceListInfo.DeviceList; - var allDevice = Common.Room.AllRoomDeviceUIList; - var allScene = Common.Room.AllRoomSceneUIList; + var allDevice = HdlRoomLogic.Current.GetAllRoomListDevice(); + var allScene = HdlSceneLogic.Current.GetAllRoomSceneList(); if (deviceList != null && allDevice.Count != 0) { @@ -338,7 +347,7 @@ sceneView.Show(); sceneView.EditorAction = (s, r) => { - if(r.Id!=room.Id) + if (r.Id != room.Id) { RemoveFromParent(); } -- Gitblit v1.8.0