From c1d681f496f2e1c53f88472d803e3c95fab521af Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期四, 29 七月 2021 09:46:16 +0800
Subject: [PATCH] 萤石测试通过
---
HDL_ON/UI/UI2/2-Classification/RoomPage.cs | 35 ++++++++++++++++++++++++-----------
1 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs
old mode 100755
new mode 100644
index 3589474..9b05c24
--- 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 (function.Spk_Prefix == FunctionCategory.Sensor || function.spk == SPK.ElectricEnergy)
{
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,
@@ -176,12 +189,12 @@
UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
IsSelected = scene.collect
};
- //bodyDiv.AddChidren(btnCollectionIcon);
+ bodyDiv.AddChidren(btnCollectionIcon);
//2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
- if (!DB_ResidenceData.Instance.CurrentRegion.IsOthreShare)
- {
- bodyDiv.AddChidren(btnCollectionIcon);
- }
+ //if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
+ //{
+ // bodyDiv.AddChidren(btnCollectionIcon);
+ //}
btnIcon.UnSelectedImagePath = "FunctionIcon/Scene/SceneIcon.png";
if (scene.sceneType == SceneType.MovieScene)
@@ -211,7 +224,7 @@
btnCollectionIcon.MouseUpEventHandler += (sender, e) =>
{
btnCollectionIcon.IsSelected = scene.collect = !btnCollectionIcon.IsSelected;
- scene.SaveSceneData(true);
+ scene.CollectScene();
};
}
/// <summary>
--
Gitblit v1.8.0