From f16e7e4df7e7813e4a3052dae752aae3e6937b30 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 08 七月 2022 16:53:12 +0800 Subject: [PATCH] 自研可视对讲、毫米波 --- HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs | 71 +++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+), 0 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs index fc66920..4aaf5eb 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs @@ -2,6 +2,7 @@ using HDL_ON.Stan; using HDL_ON.UI.CSS; using HDL_ON.Entity; +using System; namespace HDL_ON.UI { @@ -74,6 +75,43 @@ SelectedTextColor = CSS_Color.MainColor, }; FrameWhiteCentet1.AddChidren(btnSuctionView); + + + + + //鍔犺浇鐬椂鍊� + var btnInstantaneousValue = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(391), + Width = Application.GetMinRealAverage(32), + Height = Application.GetMinRealAverage(32), + UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png", + }; + FrameWhiteCentet1.AddChidren(btnInstantaneousValue); + var btnInstantaneousValueText = new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = btnInstantaneousValue.Bottom, + Width = Application.GetRealWidth(96), + Height = Application.GetRealHeight(29), + TextAlignment = TextAlignment.Center, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.TextualColor, + TextID = StringId.AlarmDataStatistics, + IsMoreLines = true + }; + FrameWhiteCentet1.AddChidren(btnInstantaneousValueText); + EventHandler<MouseEventArgs> eventHandler = (sender, e) => { + //var page = new SocketPage_InstantaneousValue(function); + //MainPage.BasePageView.AddChidren(page); + //page.LoadPage(); + //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + btnInstantaneousValue.MouseUpEventHandler = eventHandler; + btnInstantaneousValueText.MouseUpEventHandler = eventHandler; + + } /// <summary> @@ -119,6 +157,7 @@ { Application.RunOnMainThread(() => { var temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.ActionStatus); + if (temp != null) { if (temp.state == "fall") //璺屽�� @@ -140,6 +179,38 @@ btnSuctionView.IsSelected = true; } } + + else + { + temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.PeopleStatus); + if (temp != null) + { + if (temp.state == "true") + { + btnIcon.IsSelected = true; + btnSuctionView.TextID = StringId.Someone; + btnSuctionView.IsSelected = true; + } + else + { + btnIcon.IsSelected = false; + btnSuctionView.TextID = StringId.SensorNormalState; + btnSuctionView.IsSelected = false; + } + //澧炲姞瀹為獙瀹ゆā寮忓弽棣� + var tempStatus = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus); + if(tempStatus != null) + { + if(tempStatus.state == "4") + { + btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneFellBgIcon.png"; + btnSuctionView.TextID = StringId.SomeoneFell; + btnSuctionView.IsSelected = true; + } + } + } + } + }); } -- Gitblit v1.8.0