From ee736e5d594e973e63e85647caa03cf635c8867f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 20 七月 2023 10:42:21 +0800 Subject: [PATCH] 增加视频门锁电池管理说明页面 --- HDL-ON_Android/HDL-ON_Android.csproj | 1 HDL-ON_iOS/Resources/Language.ini | 5 + HDL_ON/UI/UI2/2-Classification/FunctionPage.cs | 2 HDL-ON_Android/Assets/Language.ini | 5 + HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs | 79 ++++++++++++++++++++++++- HDL-ON_iOS/HDL-ON_iOS.csproj | 1 HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs | 68 ++++++++++++++++++++++ HDL_ON/Common/R.cs | 4 + HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 6 ++ HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png | 0 11 files changed, 165 insertions(+), 6 deletions(-) diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 05d3ffb..659b4f9 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -664,6 +664,7 @@ 677=High 678=Current user data has been cleared, about to return to the previous page. 679=Group control +680=Colorful switch @@ -2002,6 +2003,7 @@ 677=楂� 678=褰撳墠鐢ㄦ埛鏁版嵁宸叉竻绌猴紝鍗冲皢杩斿洖涓婁竴椤点�� 679=缇ゆ帶 +680=鐐僵寮�鍏� @@ -3339,6 +3341,7 @@ 677=High 678=Current user data has been cleared, about to return to the previous page. 679=Group control +680=Colorful switch @@ -4672,6 +4675,7 @@ 677=High 678=Current user data has been cleared, about to return to the previous page. 679=Group control +680=Colorful switch @@ -5994,6 +5998,7 @@ 677=High 678=Current user data has been cleared, about to return to the previous page. 679=Group control +680=Colorful switch diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png new file mode 100644 index 0000000..e0eab23 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index f619aa0..18122bc 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -455,6 +455,7 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\DoorlockHelpImage3.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\DoorlockHelpImage4.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HorseRaceLampIcon.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockBatteryManagementBg.png" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\values\colors.xml" /> diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index e2c88cf..f095271 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -1615,6 +1615,7 @@ <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage3.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorlockHelpImage4.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HorseRaceLampIcon.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\VideoDoorlockBatteryManagementBg.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 05d3ffb..659b4f9 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -664,6 +664,7 @@ 677=High 678=Current user data has been cleared, about to return to the previous page. 679=Group control +680=Colorful switch @@ -2002,6 +2003,7 @@ 677=楂� 678=褰撳墠鐢ㄦ埛鏁版嵁宸叉竻绌猴紝鍗冲皢杩斿洖涓婁竴椤点�� 679=缇ゆ帶 +680=鐐僵寮�鍏� @@ -3339,6 +3341,7 @@ 677=High 678=Current user data has been cleared, about to return to the previous page. 679=Group control +680=Colorful switch @@ -4672,6 +4675,7 @@ 677=High 678=Current user data has been cleared, about to return to the previous page. 679=Group control +680=Colorful switch @@ -5994,6 +5998,7 @@ 677=High 678=Current user data has been cleared, about to return to the previous page. 679=Group control +680=Colorful switch diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png new file mode 100644 index 0000000..e0eab23 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png Binary files differ diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index 4b3807e..a809493 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -6,6 +6,10 @@ { /// <summary> + /// 鐐僵寮�鍏� + /// </summary> + public const int ColorfulSwitch = 680; + /// <summary> /// 缇ゆ帶 /// </summary> public const int GroupControl = 679; diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs index eab9b27..271b160 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs @@ -164,7 +164,7 @@ if (titleId == StringId.Lights) { - functionList.AddRange(FunctionList.List.groupControls); + //functionList.AddRange(FunctionList.List.groupControls); functionList.AddRange(FunctionList.List.GetLightList()); } else if(titleId == StringId.HorseRaceLamp) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs index 3593598..60f9806 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs @@ -2053,6 +2053,7 @@ void UpdataFunctionRow() { + contentView.RemoveAll(); for (var i =0;i< functionRowList.Count; i++) { try @@ -2064,6 +2065,11 @@ { if (view.Tag != null) { + if (view.Tag.ToString() == FunctionAttributeKey.OnOff) + { + contentView.AddChidren(view); + + } if (isOnStatus) { if (view.Tag.ToString() != FunctionAttributeKey.OnOff) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs index 63cd333..2fd1ff6 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs @@ -41,6 +41,74 @@ }; bodyView.AddChidren(contentView); + #region 鐐僵寮�鍏� + contentView.AddChidren(new Button + { + Height = Application.GetRealHeight(10), + BackgroundColor = CSS_Color.BackgroundColor, + }); + + var viewSwitch = new FrameLayout() + { + Height = Application.GetRealHeight(50), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + contentView.AddChidren(viewSwitch); + + var btnSwitchText = new Button() + { + X = Application.GetRealWidth(16), + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.SubheadingFontSize, + TextID = StringId.ColorfulFunction, + }; + viewSwitch.AddChidren(btnSwitchText); + + var btnColorfulSwitch = new Button() + { + X = Application.GetRealWidth(314), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(48), + Height = Application.GetMinRealAverage(36), + UnSelectedImagePath = "Public/Switch.png", + SelectedImagePath = "Public/SwitchOn.png", + IsSelected = function.GetAttrState(FunctionAttributeKey.Colorful) == "on" + }; + viewSwitch.AddChidren(btnColorfulSwitch); + + btnColorfulSwitch.MouseUpEventHandler = (sender, e) => { + btnColorfulSwitch.IsSelected = !btnColorfulSwitch.IsSelected; + new System.Threading.Thread(() => + { + try + { + var controlColorfulState = btnColorfulSwitch.IsSelected ? "on" : "off"; + function.SetAttrState(FunctionAttributeKey.Colorful, controlColorfulState); + var d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.Colorful, controlColorfulState); + if (controlColorfulState == "on") + { + var color = function.GetAttrState(FunctionAttributeKey.ColorfulBegin).Split(","); + var sendColorString = color[0] + "," + color[1] + "," + color[2]; + d.Add(FunctionAttributeKey.ColorfulBegin, sendColorString); + color = function.GetAttrState(FunctionAttributeKey.ColorfulEnd).Split(","); + sendColorString = color[0] + "," + color[1] + "," + color[2]; + d.Add(FunctionAttributeKey.ColorfulEnd, sendColorString); + d.Add(FunctionAttributeKey.ColorfulTime, function.GetAttrState(FunctionAttributeKey.ColorfulTime)); + } + Control.Ins.SendWriteCommand(function, d); + } + catch (Exception ex) + { + MainPage.Log($"鎺у埗鐐僵寮�鍏冲紓甯�:{ex.Message}"); + } + }) + { IsBackground = true }.Start(); + }; + + #endregion + #region 璧峰棰滆壊 var startView = new FrameLayout() { diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs index 3491440..9f0c115 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs @@ -19,19 +19,88 @@ new TopViewDiv(bodyView, Language.StringByID(StringId.AudioSetup)).LoadTopView(); bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; - var btn = new Button() + + var view1 = new FrameLayout() { - Width = Application.GetRealWidth(343), + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(276), + BackgroundColor = CSS_Color.MainBackgroundColor, + BackgroundImagePath = "FunctionIcon/Doorlock/VideoDoorlockBatteryManagementBg.png" + }; + bodyView.AddChidren(view1); + + + var btnTitle1 = new Button() + { + Width = Application.GetRealWidth(200), X = Application.GetRealWidth(16), - Y = Application.GetRealHeight(64 + 24), + Y = Application.GetRealHeight(16), IsMoreLines = true, TextAlignment = TextAlignment.TopLeft, - TextSize = CSS_FontSize.TextFontSize, + TextSize = CSS_FontSize.HeadlineFontSize, TextColor = CSS_Color.FirstLevelTitleColor, + Text = "闂ㄩ攣鐢垫簮", }; - bodyView.AddChidren(btn); + view1.AddChidren(btnTitle1); + var btnMsg1 = new Button() + { + X = Application.GetRealWidth(16), + Y = Application.GetRealHeight(57), + Width = Application.GetRealWidth(213), + Height = Application.GetRealHeight(200), + TextAlignment = TextAlignment.TopLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.TextFontSize, + IsMoreLines = true, + Text = "鎵撳紑瀹ゅ唴闈㈡澘鐢垫睜鐩栵紝鍙栧嚭閿傜數姹犺繘琛屽厖鐢点�俓r\n璇蜂娇鐢� 5V2A 閫傞厤鍣ㄥ閿傜數姹犺繘琛屽厖鐢点��" + }; + view1.AddChidren(btnMsg1); + var view2 = new FrameLayout() + { + Y = Application.GetRealHeight(8) + view1.Bottom, + BackgroundColor = CSS_Color.MainBackgroundColor, + Height = Application.GetRealHeight(170) + }; + bodyView.AddChidren(view2); + + var btnTitle2 = new Button() + { + Width = Application.GetRealWidth(200), + X = Application.GetRealWidth(16), + Y = Application.GetRealHeight(16), + IsMoreLines = true, + TextAlignment = TextAlignment.TopLeft, + TextSize = CSS_FontSize.HeadlineFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + Text = "浣庣數閲忚鏄�", + }; + view2.AddChidren(btnTitle2); + + var btnMsg2 = new Button() + { + X = Application.GetRealWidth(16), + Y = Application.GetRealHeight(57), + Width = Application.GetRealWidth(213), + Height = Application.GetRealHeight(110), + TextAlignment = TextAlignment.TopLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + TextSize = CSS_FontSize.TextFontSize, + IsMoreLines = true, + Text = "璁惧鐢甸噺浣庢椂灏嗚嚜鍔ㄥ叧闂娴嬪敜閱掑姛鑳斤紝浜鸿劯璇嗗埆寮�閿佷负鎵嬪姩瑙﹀彂銆俓r\n 褰撶數閲忎綆浜庢瀬闄愬�兼椂锛屼负淇濊瘉搴旀�ュ紑閿侊紝璁惧灏嗚嚜鍔ㄧ绾垮苟浠呮敮鎸佸紑閿佸姛鑳姐��" + }; + view2.AddChidren(btnMsg2); + + if (Language.CurrentLanguage != "Chinese") + { + btnTitle1.Text = "Door lock power supply"; + btnMsg1.Text = "Open the indoor panel battery cover and remove the lithium battery for charging.\r\n" + + "Please use a 5V2A adapter to charge the lithium battery."; + btnTitle2.Text = "Low battery description"; + btnMsg2.Text = "When the device's battery is low, the detection and wake-up function will be automatically turned off, and the facial recognition unlock will be manually triggered.\r\n" + + "When the battery level drops below the limit value, to ensure emergency unlocking, the device will automatically go offline and only support unlocking function."; + } } -- Gitblit v1.8.0