From 94d6591af7870ba0f1f7797310c07581d6fcd0b4 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期五, 04 十一月 2022 16:27:14 +0800 Subject: [PATCH] 2022年11月04日16:26:44 --- HDL_ON/UI/UI2/2-Classification/FunctionPage.cs | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 53 insertions(+), 1 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs index 3db5ac0..23f59f9 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs @@ -37,6 +37,7 @@ public void LoadPage(int titleId) { + bodyView.BackgroundColor = CSS_Color.BackgroundColor; if (titleId == StringId.Lights) { @@ -65,6 +66,38 @@ { new TopViewDiv(bodyView, Language.StringByID(titleId)).LoadTopView(); } + + + +#if DEBUG + //Button testBtn = new Button() + //{ + // X = Application.GetRealWidth(80), + // Height = Application.GetRealHeight(64), + // BackgroundColor = 0xFFFF0000 + //}; + //bodyView.AddChidren(testBtn); + //int ddd = 0; + //testBtn.MouseUpEventHandler = (sender, e) => { + // ddd++; + + // Function function_online = FunctionList.List.GetLightList().Find((obj) => obj.sid == "0001017DB92D2602020100010101"); + // if (ddd % 2 == 0) + // { + // function_online.online = true; + // } + // else + // { + // function_online.online = false; + // } + // HomePage.LoadEvent_RefreshDevcieOnline(function_online); + // FunctionPage.UpdataOnline(function_online); + // RoomPage.UpdataOnline(function_online); + + + //}; +#endif + /// <summary> /// 鎴块棿鍐呭鏄剧ず鍖哄煙 /// </summary> @@ -154,6 +187,25 @@ ShowFunctionRow(functionList); LoadDialog_ChangeFloor(); + + + #region 鍔犺浇缁勫悎璋冨厜鍦烘櫙 + if (titleId == StringId.Lights) + { + foreach (var lightScene in FunctionList.List.scenes) + { + if (lightScene.sceneType == SceneType.LightScene) + if (lightScene != null) + { + functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) }); + var sceneRow = new SceneControlZone(lightScene); + functionListView.AddChidren(sceneRow); + sceneRow.LoadView(); + } + } + } + #endregion + } /// <summary> @@ -168,7 +220,7 @@ { continue; } - if (function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) + if (function.spk == SPK.LightRGBW || function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) { var functionDiv = new FunctionControlZone(function) { -- Gitblit v1.8.0