From e7290281eabcb88d2e430dea9782565474837ce1 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期五, 20 十月 2023 14:29:54 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wjc --- HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 43 insertions(+), 4 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs index c48a8d5..96465f1 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs @@ -213,10 +213,22 @@ Y = Application.GetRealHeight(466), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), - //UnSelectedImagePath = "Public/PowerClose.png", - UnSelectedImagePath = "Public/PowerOpen.png", + UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on.png", }; controlView.AddChidren(btnOn); + var btnOnText = new Button() + { + X = Application.GetRealWidth(100-9), + Y = Application.GetRealHeight(500), + Width = Application.GetMinRealAverage(50), + Height = Application.GetMinRealAverage(32), + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.TextFontSize, + TextAlignment = TextAlignment.Center, + TextID = StringId.Open, + }; + controlView.AddChidren(btnOnText); + var btnOff = new Button() { @@ -224,10 +236,24 @@ Y = Application.GetRealHeight(466), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), - UnSelectedImagePath = "Public/PowerClose.png", - //UnSelectedImagePath = "Public/PowerOpen.png", + UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off.png", }; controlView.AddChidren(btnOff); + var btnOffText = new Button() + { + X = Application.GetRealWidth(180 - 9), + Y = Application.GetRealHeight(500), + Width = Application.GetMinRealAverage(50), + Height = Application.GetMinRealAverage(32), + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.TextFontSize, + TextAlignment = TextAlignment.Center, + TextID = StringId.Close, + }; + controlView.AddChidren(btnOffText); + + + btnOn.MouseUpEventHandler = (sender, e) => { var d = new Dictionary<string, string>(); @@ -241,6 +267,19 @@ d.Add(FunctionAttributeKey.OnOff, "off"); function.Control(d); }; + btnOnText.MouseUpEventHandler = (sender, e) => + { + var d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.OnOff, "on"); + function.Control(d); + }; + + btnOffText.MouseUpEventHandler = (sender, e) => + { + var d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.OnOff, "off"); + function.Control(d); + }; if (hadRGB) -- Gitblit v1.8.0