From cbc156bc38d8b8eae7aef60cb186ab2b52fa701f Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期二, 16 七月 2024 13:59:56 +0800 Subject: [PATCH] 增加全部挂断 --- HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 91 +++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 82 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 84471ba..9c4f0e5 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -444,7 +444,7 @@ SelectedImagePath = "Collection/DefenseStatusIcon.png", UnSelectedImagePath = "Collection/DisarmStatusIcon.png" }; - if (DB_ResidenceData.Instance.GatewayType == 1) + if (DB_ResidenceData.Instance.GatewayType == 1 && !DB_ResidenceData.Instance.CurrentRegion.isOtherShare) { topView.AddChidren(btnSecurityStatus); @@ -502,6 +502,10 @@ UnSelectedImagePath = "Collection/MsgIcon.png", SelectedImagePath = "Collection/MsgIconTip.png", }; + if(btnSecurityStatus.Parent == null) + { + btnMsgIcon.X = Application.GetRealWidth(329); + } topView.AddChidren(btnMsgIcon); @@ -549,6 +553,17 @@ LoadContentView(); #endregion + +#if DEBUG + btnResidenceName.MouseUpEventHandler = (envent, ee) => { + MainPage.Log("sss"); + new System.Threading.Thread(async() => + { + await Common.AliyunLog.AliyunLogClient.PostLogs("鍛婅娴嬭瘯", "娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅"); + }) + { IsBackground = true }.Start(); + }; +#endif } catch (Exception ex) { @@ -1294,7 +1309,7 @@ switch (tempStatus.state) {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔� case "0": - function.lastState = Language.StringByID(StringId.SensorNormalState); + function.lastState = Language.StringByID(StringId.wuren); break; case "1": function.lastState = Language.StringByID(StringId.SomeoneIn); @@ -1411,7 +1426,8 @@ if (//SPK.CurtainSpkList().Contains(function.spk)) function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainDream || - function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex) + function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex + ) { btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainIcon.png"; btnIcon.SelectedImagePath = "FunctionIcon/Curtain/CurtainOnIcon.png"; @@ -1426,6 +1442,7 @@ SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseWhiteIcon_Shadow.png", }; view.AddChidren(btnCurtainClose); + Button btnCurtainOpen; btnCurtainOpen = new Button() @@ -1476,7 +1493,7 @@ view.AddChidren(btnPower); btnState.Text = function.GetAttrState("song_name"); - + btnState.Width = Application.GetRealWidth(90); btnState.SelectedTextColor = CSS_Color.MainBackgroundColor; btnState.TextColor = CSS_Color.MainBackgroundColor;//PromptingColor1 @@ -1568,11 +1585,67 @@ //涓轰簡鍘绘帀寮�鍏虫寜閽� btnIcon.UnSelectedImagePath = "AksIcon/yingyinzhongkong1.png"; } - //else if (function.spk == SPK.GroupControl) - //{ - // btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; - // btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; - //} + else if (function.spk == SPK.GroupControl) + { + btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; + btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; + if (function.spk == SPK.GroupControl) + { + Button btnClose; + Button btnOpen; + btnOpen = new Button() + { + X = Application.GetRealWidth(84), + Y = Application.GetRealWidth(89), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on_home.png", + SelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on_home_click.png", + }; + view.AddChidren(btnOpen); + + + btnClose = new Button() + { + X = btnOpen.Right, + Y = Application.GetRealWidth(89), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off_home.png", + SelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off_home_click.png", + }; + view.AddChidren(btnClose); + + + btnClose.MouseDownEventHandler = (sender, e) => { + btnClose.IsSelected = true; + }; + + btnClose.MouseUpEventHandler = (sender, e) => { + btnClose.IsSelected = false; + if (function.spk == SPK.GroupControl) + { + var d = new Dictionary<string, string>(); + d.Add("on_off", "off"); + (function as GroupControl).Control(d); + } + }; + btnOpen.MouseDownEventHandler = (sender, e) => { + btnOpen.IsSelected = true; + }; + btnOpen.MouseUpEventHandler = (sender, e) => { + btnOpen.IsSelected = false; + if (function.spk == SPK.GroupControl) + { + var d = new Dictionary<string, string>(); + d.Add("on_off", "on"); + (function as GroupControl).Control(d); + } + }; + + + } + } else if (function.spk == SPK.ElectricEnergy || function.spk == SPK.AirSwitch || function.spk == SPK.AirSwitchP3) { -- Gitblit v1.8.0