From 6d73bf6e816570291865674bef8bce8972e4de3f Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期三, 01 十二月 2021 16:32:57 +0800 Subject: [PATCH] 2021-12-01-01 --- HDL_ON/UI/UI2/2-Classification/RoomPage.cs | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs index b41b765..b2138df 100644 --- a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs @@ -27,10 +27,21 @@ /// 鍒犻櫎鎴块棿浜嬩欢 /// </summary> Action deleteAction; + /// <summary> + /// 鍥剧墖淇敼浜嬩欢 + /// </summary> + Action modifyImageAction; #endregion - public RoomPage(Room r, Action rrn, Action delAction) + /// <summary> + /// + /// </summary> + /// <param name="r"></param> + /// <param name="rrn">缂栬緫浜嬩欢</param> + /// <param name="delAction">鍒犻櫎浜嬩欢鍥炶皟</param> + /// <param name="modifyImageAction">鎴块棿鑳屾櫙鍥句慨鏀逛簨浠跺洖璋�</param> + public RoomPage(Room r, Action rrn, Action delAction, Action modifyImageAction) { bodyView = this; room = r; @@ -40,6 +51,7 @@ }; ReloadRoomName = rrn; deleteAction = delAction; + this.modifyImageAction = modifyImageAction; } /// <summary> /// 閲嶈浇鐣岄潰 @@ -65,14 +77,14 @@ foreach (var function in room.GetRoomFunctions(false)) { - if (function.functionCategory == FunctionCategory.Sensor) + if (MainPage.RoomNotSupportFunctionList.Contains( function.spk)) { continue; } functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) }); - if (function.functionType == FunctionType.RGB || function.functionType == FunctionType.Dimmer) + if (function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) { var functionDiv = new FunctionControlZone(function) { @@ -83,7 +95,7 @@ BorderColor = 0x00FFFFFF, BorderWidth = 1, BackgroundColor = CSS_Color.MainBackgroundColor, - Tag = function.functionCategory.ToString() + "-" + function.functionType + "-" + function.sid + Tag = function.spk + function.sid }; functionDiv.LoadFunctionDiv(); functionListView.AddChidren(functionDiv); @@ -99,7 +111,7 @@ BorderColor = 0x00FFFFFF, BorderWidth = 1, BackgroundColor = CSS_Color.MainBackgroundColor, - Tag = function.functionCategory.ToString() + "-" + function.functionType + "-" + function.sid + Tag = function.spk + function.sid }; functionDiv.LoadFunctionDiv(); functionListView.AddChidren(functionDiv); @@ -107,6 +119,7 @@ } foreach (var scene in room.GetRoomScenes(false)) { + functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) }); var sceneRow = new FrameLayout() { Gravity = Gravity.CenterHorizontal, @@ -177,6 +190,12 @@ IsSelected = scene.collect }; bodyDiv.AddChidren(btnCollectionIcon); + //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳� + //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) + //{ + // bodyDiv.AddChidren(btnCollectionIcon); + //} + btnIcon.UnSelectedImagePath = "FunctionIcon/Scene/SceneIcon.png"; if (scene.sceneType == SceneType.MovieScene) { @@ -205,7 +224,7 @@ btnCollectionIcon.MouseUpEventHandler += (sender, e) => { btnCollectionIcon.IsSelected = scene.collect = !btnCollectionIcon.IsSelected; - scene.SaveSceneData(true); + scene.CollectScene(); }; } /// <summary> -- Gitblit v1.8.0