From 9090550cb5b031dcfef806078a079b03ba79302f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 26 七月 2023 09:14:49 +0800 Subject: [PATCH] bug修复 --- HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL-ON_Android/Assets/Language.ini | 12 + HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs | 7 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserListPage.cs | 17 + HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs | 28 +- HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockAudioSetupPage.cs | 130 ++++++++++--- HDL-ON_iOS/Resources/Phone/FunctionIcon/Music/MusicPlayOnIcon.png | 0 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs | 14 HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs | 315 +++++++++++++++---------------- HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockFaceUnlockTriggerSettingPage.cs | 1 HDL-ON_iOS/Resources/Language.ini | 12 + HDL_ON/DAL/Server/NewAPI.cs | 4 HDL-ON_Android/Assets/Phone/FunctionIcon/Music/MusicPlayOnIcon.png | 0 HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs | 5 HDL_ON/Common/R.cs | 10 + HDL_ON/UI/MainPage.cs | 2 HDL_ON/UI/UI1-Login/LoginPage.cs | 2 17 files changed, 334 insertions(+), 227 deletions(-) diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 3146ce3..75c5e2b 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -669,6 +669,7 @@ 682=Group 683=The time is invalid 684=Length out of range +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. @@ -2014,6 +2015,11 @@ 682=缇ょ粍 683=璇ユ椂闂存棤鏁� 684=闀垮害瓒呭嚭鑼冨洿 +685=娉細鐢ㄦ埛绠$悊浠呭彲瀵瑰凡娣诲姞鐢ㄦ埛杩涜绠$悊銆傚闇�娣诲姞鏂扮敤鎴凤紝璇峰墠寰�閿佺杩涜鐩稿叧鎿嶄綔銆� + + + + @@ -3356,7 +3362,7 @@ 682=Group 683=The time is invalid 684=Length out of range - +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. @@ -4696,7 +4702,7 @@ 682=Group 683=The time is invalid 684=Length out of range - +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. @@ -6023,6 +6029,8 @@ 682=Group 683=The time is invalid 684=Length out of range +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. + diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Music/MusicPlayOnIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Music/MusicPlayOnIcon.png index 42639bb..a7714e4 100644 --- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Music/MusicPlayOnIcon.png +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Music/MusicPlayOnIcon.png Binary files differ diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 19c387b..b773372 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.0.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307251"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.0.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307261"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <uses-permission android:name="android.permission.RECEIVE_SMS" /> <!--鍙嬬洘--> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 3146ce3..75c5e2b 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -669,6 +669,7 @@ 682=Group 683=The time is invalid 684=Length out of range +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. @@ -2014,6 +2015,11 @@ 682=缇ょ粍 683=璇ユ椂闂存棤鏁� 684=闀垮害瓒呭嚭鑼冨洿 +685=娉細鐢ㄦ埛绠$悊浠呭彲瀵瑰凡娣诲姞鐢ㄦ埛杩涜绠$悊銆傚闇�娣诲姞鏂扮敤鎴凤紝璇峰墠寰�閿佺杩涜鐩稿叧鎿嶄綔銆� + + + + @@ -3356,7 +3362,7 @@ 682=Group 683=The time is invalid 684=Length out of range - +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. @@ -4696,7 +4702,7 @@ 682=Group 683=The time is invalid 684=Length out of range - +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. @@ -6023,6 +6029,8 @@ 682=Group 683=The time is invalid 684=Length out of range +685=note: User management can only manage added users. If you need to add a new user, please go to the lock end for relevant operations. + diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Music/MusicPlayOnIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Music/MusicPlayOnIcon.png index 42639bb..a7714e4 100644 --- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Music/MusicPlayOnIcon.png +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Music/MusicPlayOnIcon.png Binary files differ diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index 85486f6..452b955 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -5,6 +5,16 @@ public static class StringId { + + + + + + + /// <summary> + /// 娉細鐢ㄦ埛绠$悊浠呭彲瀵瑰凡娣诲姞鐢ㄦ埛杩涜绠$悊銆傚闇�娣诲姞鏂扮敤鎴凤紝璇峰墠寰�閿佺杩涜鐩稿叧鎿嶄綔銆� + /// </summary> + public const int VideoDoorlockManagerTip = 685; /// <summary> /// 闀垮害瓒呭嚭鑼冨洿 /// </summary> diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs index 975830e..2eca374 100644 --- a/HDL_ON/DAL/Server/NewAPI.cs +++ b/HDL_ON/DAL/Server/NewAPI.cs @@ -902,9 +902,9 @@ public const string Api_Post_GetDoorlockUserList = "/home-wisdom/platform/yingshi/lock/user/list"; /// <summary> - /// 鏇存敼闂ㄩ攣鐢ㄦ埛澶囨敞鍚� + /// 鏇存敼闂ㄩ攣鐢ㄦ埛澶囨敞鍚� /// </summary> - public const string Api_Post_setDoorUserRemark = "/home-wisdom/platform/yingshi/lock/user/list"; + public const string Api_Post_setDoorUserRemark = "/home-wisdom/platform/yingshi/lock/setDoorUserRemark"; /// <summary> /// 鍒犻櫎鐢ㄦ埛鏁板瓧瀵嗙爜 /// </summary> diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index e18b5ce..960f6cf 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -26,7 +26,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.9.0"; + public static string VersionString = "2.0.0"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index 630f21c..c5cfa1d 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -312,7 +312,6 @@ //etAccount.Text = "13143792049"; etAccount.Text = "18688414428";//澶╂渤3妤� //etAccount.Text = "18244942707"; - //etAccount.Text = "12345678904"; //etAccount.Text = "13418062953"; etAccount.Text = "13138683659"; //etAccount.Text = "15217626103"; @@ -325,6 +324,7 @@ etAccount.Text = "15855403939"; etAccount.Text = "15006564444"; etAccount.Text = "13580507523"; + //etAccount.Text = "12345678904";//2.0 娴嬭瘯 钀ょ煶 etAccount.Text = "18316672920"; } else diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs index ddba883..2aaa1dd 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs @@ -22,13 +22,15 @@ { new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView_AddIcon("CombinedDimming", - (s,c)=>{ + (s, c) => + { try { var page = new AddGroupControlPage(null, - (newGC)=> { + (newGC) => + { ReadGroupControlList(); - },()=> { }); + }, () => { }); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; @@ -49,7 +51,7 @@ #region contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); - + #endregion @@ -60,7 +62,8 @@ private void ReadGroupControlList() { - new System.Threading.Thread(() => { + new System.Threading.Thread(() => + { var pack = ApiUtlis.Ins.HttpRequest.GetGroupControlList(); if (pack != null) { @@ -68,10 +71,12 @@ { try { - var groupControlList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GroupControl>>(pack.Data.ToString()); + FunctionList.List.groupControls.Clear(); + FunctionList.List.groupControls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GroupControl>>(pack.Data.ToString()); + Application.RunOnMainThread(() => { - LoadGroupControlView(groupControlList); + LoadGroupControlView(); }); } catch (Exception ex) @@ -90,187 +95,171 @@ } - private void LoadGroupControlView(List<GroupControl> list) + private void LoadGroupControlView() { -#if DEBUG - if (list.Count == 0) + contentView.RemoveAll(); + + foreach (var groupControl in FunctionList.List.groupControls) { - list.Add(new GroupControl() + var functionRow = new RowLayout() { - name = "缁勫悎璋冨厜1", - roomIds = new List<string> {}, - sid = "00000000000000001", - type = "light", - }); + Height = Application.GetRealHeight(65), + BackgroundColor = CSS_Color.MainBackgroundColor, + LineColor = 0x00000000 + }; + contentView.AddChidren(functionRow); - list.Add(new GroupControl() + var btnRight = new Button() { - name = "缁勫悎璋冨厜2", - roomIds = new List<string> { },//Room.CurrentSpatial.RoomList[0].roomId - sid = "00000000000000002", - type = "light", - }); - } + X = Application.GetRealWidth(339), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/Right.png", + }; + functionRow.AddChidren(btnRight); -#endif - - if (list.Count == 0) - { - - } - else - { - contentView.RemoveAll(); - - foreach (var groupControl in list) + var btnFunctionName = new Button() { - var functionRow = new RowLayout() + X = Application.GetRealWidth(16), + Y = Application.GetRealHeight(10), + Width = Application.GetRealWidth(308), + Height = Application.GetRealHeight(24), + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + Text = groupControl.name, + }; + functionRow.AddChidren(btnFunctionName); + + var btnFunctionLocationInfo = new Button() + { + X = Application.GetRealWidth(16), + Y = btnFunctionName.Bottom, + Width = Application.GetRealWidth(308), + Height = Application.GetRealHeight(21), + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.PromptingColor1, + Text = groupControl.GetRoomListName(), + }; + functionRow.AddChidren(btnFunctionLocationInfo); + + + + functionRow.AddChidren( + new Button() { - Height = Application.GetRealHeight(65), - BackgroundColor = CSS_Color.MainBackgroundColor, - LineColor = 0x00000000 - }; - contentView.AddChidren(functionRow); + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(1), + Width = Application.GetRealWidth(343), + BackgroundColor = CSS_Color.DividingLineColor, + }); - var btnRight = new Button() - { - X = Application.GetRealWidth(339), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(16), - Height = Application.GetMinRealAverage(16), - UnSelectedImagePath = "Public/Right.png", - }; - functionRow.AddChidren(btnRight); - - var btnFunctionName = new Button() - { - X = Application.GetRealWidth(16), - Y = Application.GetRealHeight(10), - Width = Application.GetRealWidth(308), - Height = Application.GetRealHeight(24), - TextAlignment = TextAlignment.CenterLeft, - TextSize = CSS_FontSize.SubheadingFontSize, - TextColor = CSS_Color.FirstLevelTitleColor, - Text = groupControl.name, - }; - functionRow.AddChidren(btnFunctionName); - - var btnFunctionLocationInfo = new Button() - { - X = Application.GetRealWidth(16), - Y = btnFunctionName.Bottom, - Width = Application.GetRealWidth(308), - Height = Application.GetRealHeight(21), - TextAlignment = TextAlignment.CenterLeft, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - TextColor = CSS_Color.PromptingColor1, - Text = groupControl.GetRoomListName(), - }; - functionRow.AddChidren(btnFunctionLocationInfo); - - - - functionRow.AddChidren( - new Button() - { - Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(1), - Width = Application.GetRealWidth(343), - BackgroundColor = CSS_Color.DividingLineColor, - }); - - EventHandler<MouseEventArgs> eventHandler = (sender, e) => { - var page = new AddGroupControlPage(groupControl, - (newGC) => { - try + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + var page = new AddGroupControlPage(groupControl, + (newGC) => + { + try + { + if (newGC != null) { - if (newGC != null) + Application.RunOnMainThread(() => { - Application.RunOnMainThread(() => - { - groupControl.roomIds = newGC.uids; - btnFunctionLocationInfo.Text = newGC.GetUidListName(); - }); - } - }catch(Exception ex) - { - MainPage.Log($"鍒锋柊缇ゆ帶鎴块棿淇℃伅寮傚父:{ex.Message}"); - } - },()=> { - LoadGroupControlView(FunctionList.List.groupControls); - }); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; - functionRow.MouseUpEventHandler = eventHandler; - btnRight.MouseUpEventHandler = eventHandler; - btnFunctionName.MouseUpEventHandler = eventHandler; - btnFunctionLocationInfo.MouseUpEventHandler = eventHandler; + //groupControl.roomIds = newGC.roomIds; + //groupControl.uids = newGC.uids; + var localTemp = FunctionList.List.groupControls.Find((obj) => obj.deviceId == newGC.deviceId); + localTemp.roomIds = newGC.roomIds; + localTemp.uids = newGC.uids; + localTemp.sids = newGC.sids; - var btnDelGroupControl = new Button() + btnFunctionLocationInfo.Text = newGC.GetUidListName(); + }); + } + } + catch (Exception ex) + { + MainPage.Log($"鍒锋柊缇ゆ帶鎴块棿淇℃伅寮傚父:{ex.Message}"); + } + }, () => + { + LoadGroupControlView(); + }); + MainPage.BasePageView.AddChidren(page); + page.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; + functionRow.MouseUpEventHandler = eventHandler; + btnRight.MouseUpEventHandler = eventHandler; + btnFunctionName.MouseUpEventHandler = eventHandler; + btnFunctionLocationInfo.MouseUpEventHandler = eventHandler; + + var btnDelGroupControl = new Button() + { + TextColor = CSS_Color.MainBackgroundColor, + BackgroundColor = CSS_Color.WarningColor, + TextID = StringId.Del, + TextAlignment = TextAlignment.Center, + }; + functionRow.AddRightView(btnDelGroupControl); + btnDelGroupControl.MouseUpEventHandler = (sender1, e1) => + { + var waitPage = new Loading(); + this.AddChidren(waitPage); + waitPage.Start(""); + new System.Threading.Thread(() => { - TextColor = CSS_Color.MainBackgroundColor, - BackgroundColor = CSS_Color.WarningColor, - TextID = StringId.Del, - TextAlignment = TextAlignment.Center, - }; - functionRow.AddRightView(btnDelGroupControl); - btnDelGroupControl.MouseUpEventHandler = (sender1, e1) => { - var waitPage = new Loading(); - this.AddChidren(waitPage); - waitPage.Start(""); - new System.Threading.Thread(() => + try { - try + var pack = ApiUtlis.Ins.HttpRequest.DelGroupControl(groupControl.userDeviceGroupControlId); + if (pack != null) { - var pack = ApiUtlis.Ins.HttpRequest.DelGroupControl(groupControl.userDeviceGroupControlId); - if (pack != null) + Application.RunOnMainThread(() => { - Application.RunOnMainThread(() => + try { - try + if (pack.Code == StateCode.SUCCESS) { - if (pack.Code == StateCode.SUCCESS) - { - var delTemp = FunctionList.List.groupControls.Find((obj) => groupControl.sid == obj.sid); - FunctionList.List.groupControls.Remove(delTemp); - list.Remove(groupControl); - LoadGroupControlView(list); - } - else - { - IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); - } - }catch(Exception ex) - { - MainPage.Log($"鍒锋柊缁勬帶鏁版嵁寮傚父:{ex.Message}"); + var delTemp = FunctionList.List.groupControls.Find((obj) => groupControl.sid == obj.sid); + FunctionList.List.groupControls.Remove(delTemp); + LoadGroupControlView(); } - }); - } - }catch(Exception ex) - { - MainPage.Log($"鍒犻櫎缁勬帶寮傚父:{ex.Message}"); - } - finally - { - Application.RunOnMainThread(() => { - if (waitPage != null) + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + } + catch (Exception ex) { - waitPage.Hide(); - waitPage.RemoveFromParent(); - waitPage = null; + MainPage.Log($"鍒锋柊缁勬帶鏁版嵁寮傚父:{ex.Message}"); } }); } - }) - { IsBackground = true }.Start(); - }; - - } + } + catch (Exception ex) + { + MainPage.Log($"鍒犻櫎缁勬帶寮傚父:{ex.Message}"); + } + finally + { + Application.RunOnMainThread(() => + { + if (waitPage != null) + { + waitPage.Hide(); + waitPage.RemoveFromParent(); + waitPage = null; + } + }); + } + }) + { IsBackground = true }.Start(); + }; } + } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs index 3b9270e..b05731e 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs @@ -891,7 +891,7 @@ //6500K var btnTempClolorMax = new Button(); btnTempClolorMax.Y = btnTempClolorMin.Y; - btnTempClolorMax.X = barColorTemplatrue.Right - Application.GetRealWidth(30); + btnTempClolorMax.X = barColorTemplatrue.Right - Application.GetRealWidth(15); btnTempClolorMax.Width = Application.GetRealWidth(54); btnTempClolorMax.Height = Application.GetRealHeight(21); btnTempClolorMax.Text = "6500K"; @@ -975,8 +975,7 @@ function.SetAttrState(FunctionAttributeKey.Colorful, controlColorfulState); var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.Colorful, controlColorfulState); - - Control.Ins.SendWriteCommand(function, d); + function.Control(d); } catch (Exception ex) { diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs index f1ee2e9..a9eaf42 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingFacePage.cs @@ -90,6 +90,21 @@ bodyView.AddChidren(waitPage); waitPage.Start(""); + #endregion + + contentView.AddChidren(new Button() + { + Height = Application.GetRealHeight(8), + BackgroundColor = CSS_Color.BackgroundColor, + }); + + var view = new VerticalScrolViewLayout() + { + Height = Application.GetRealHeight(300), + }; + contentView.AddChidren(view); + + btnFaceUnlockSwitchIcon.MouseUpEventHandler = (sender, e) => { waitPage.Start(""); @@ -110,6 +125,7 @@ { //鏇存柊鐣岄潰 btnFaceUnlockSwitchIcon.IsSelected = changeState; + loadSubView(view, faceUnlockSetup); }); } else @@ -145,19 +161,7 @@ }) { IsBackground = true }.Start(); }; - #endregion - contentView.AddChidren(new Button() - { - Height = Application.GetRealHeight(8), - BackgroundColor = CSS_Color.BackgroundColor, - }); - - var view = new VerticalScrolViewLayout() - { - Height = Application.GetRealHeight(300), - }; - contentView.AddChidren(view); new System.Threading.Thread(() => { try diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockAudioSetupPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockAudioSetupPage.cs index cfa8765..3710ade 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockAudioSetupPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockAudioSetupPage.cs @@ -12,17 +12,17 @@ FrameLayout bodyView; Function device; - /// <summary> - /// 闂ㄩ搩绯荤粺闊抽噺 + /// 闂ㄩ攣绯荤粺闊抽噺 /// </summary> - int doorlockSystemSound = 0; + DoorLockSystemSound doorLockSystemSound; /// <summary> /// 闂ㄩ搩闊抽噺 /// </summary> - int doorbelVol = 0; + int doorbellVol = 0; public VideoDoorlockAudioSetupPage(Function function) { + doorLockSystemSound = new DoorLockSystemSound(); device = function; bodyView = this; } @@ -74,7 +74,7 @@ btnDoorlockSystemVolumeText.MouseUpEventHandler = (sender, e) => { - LoadEditDialog(StringId.DoorlockSystemVolume, 3-doorlockSystemSound, btnDoorlockSystemVolumeStateText); + LoadEditDialog(StringId.DoorlockSystemVolume, btnDoorlockSystemVolumeStateText,true); }; #endregion @@ -124,7 +124,7 @@ btnDoorbellVolumeText.MouseUpEventHandler = (sender, e) => { - LoadEditDialog(StringId.DoorbellVolume, doorbelVol, btnDoorbellVolumeStateText); + LoadEditDialog(StringId.DoorbellVolume, btnDoorbellVolumeStateText,false); }; #endregion @@ -149,25 +149,21 @@ Application.RunOnMainThread(() => { //鏇存柊鐣岄潰 - var doorLockSystemSound = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockSystemSound>(pack.Data.ToString()); + doorLockSystemSound = Newtonsoft.Json.JsonConvert.DeserializeObject<DoorLockSystemSound>(pack.Data.ToString()); if(doorLockSystemSound != null) { switch (doorLockSystemSound.sound) { case 0: - doorlockSystemSound = 0; btnDoorlockSystemVolumeStateText.TextID = StringId.Mute; break; case 1: - doorlockSystemSound = 1; btnDoorlockSystemVolumeStateText.TextID = StringId.Low; break; case 2: - doorlockSystemSound = 2; btnDoorlockSystemVolumeStateText.TextID = StringId.Moderate; break; case 3: - doorlockSystemSound = 3; btnDoorlockSystemVolumeStateText.TextID = StringId.High; break; } @@ -205,22 +201,22 @@ { if (doorbellTone.volume == 0) { - doorbelVol = 3; + doorbellVol = 0; btnDoorbellVolumeStateText.TextID = StringId.Mute; } else if (doorbellTone.volume > 0 && doorbellTone.volume < 35) { - doorbelVol = 2; + doorbellVol = 1; btnDoorbellVolumeStateText.TextID = StringId.Low; } else if (doorbellTone.volume > 35 && doorbellTone.volume < 70) { - doorbelVol = 1; + doorbellVol = 2; btnDoorbellVolumeStateText.TextID = StringId.Moderate; } else if (doorbellTone.volume > 70) { - doorbelVol = 0; + doorbellVol = 3; btnDoorbellVolumeStateText.TextID = StringId.High; } } @@ -271,10 +267,10 @@ /// <summary> /// 鍔犺浇鍔熻兘灞炴�ф暟鎹�夋嫨寮圭獥 /// </summary> - void LoadEditDialog(int titleId, int index, Button btn) + void LoadEditDialog(int titleId, Button btn,bool isDoorlockSystemVolume) { Button lastButton = new Button(); - var lastData = ""; + var lastText = ""; Dialog dialog = new Dialog(); @@ -311,7 +307,7 @@ { Gravity = Gravity.CenterHorizontal, TextAlignment = TextAlignment.Center, - Width = Application.GetRealWidth(100), + Width = Application.GetRealWidth(150), TextID = titleId, IsBold = true, TextColor = CSS_Color.FirstLevelTitleColor, @@ -340,7 +336,7 @@ TextID = StringId.Complete, }; topView.AddChidren(btnConfrim); - int hei = 1; + int index = 1; var statusList = new List<string> { Language.StringByID(StringId.High), @@ -353,11 +349,11 @@ { var row = new FrameLayout() { - Y = Application.GetRealHeight(50 * hei), + Y = Application.GetRealHeight(50 * index), Height = Application.GetRealHeight(50), }; optionBaseView.AddChidren(row); - if (statusList.Count > hei) + if (statusList.Count > index) { optionBaseView.AddChidren(new Button() { @@ -377,13 +373,76 @@ Height = Application.GetMinRealAverage(28), UnSelectedImagePath = "Public/ChooseIcon.png", SelectedImagePath = "Public/ChooseOnIcon.png", - + Tag = index - 1, }; row.AddChidren(btnChoose); - if (index == hei - 1) + if (isDoorlockSystemVolume) {//璁剧疆闂ㄩ攣绯荤粺闊抽噺 + switch (doorLockSystemSound.sound) + { + case 0: + if (index == 3 + 1) + { + lastButton = btnChoose; + btnChoose.IsSelected = true; + } + break; + case 1: + if (index == 2 + 1) + { + lastButton = btnChoose; + btnChoose.IsSelected = true; + } + break; + case 2: + if (index == 1 + 1) + { + lastButton = btnChoose; + btnChoose.IsSelected = true; + } + break; + case 3: + if (index == 0 + 1) + { + lastButton = btnChoose; + btnChoose.IsSelected = true; + } + break; + } + } + else//璁剧疆闂ㄩ搩闊抽噺 { - lastButton = btnChoose; - btnChoose.IsSelected = true; + switch (doorbellVol) + { + case 0: + if (index == 3 + 1) + { + lastButton = btnChoose; + btnChoose.IsSelected = true; + } + break; + case 1: + if (index == 2 + 1) + { + lastButton = btnChoose; + btnChoose.IsSelected = true; + } + break; + case 2: + if (index == 1 + 1) + { + lastButton = btnChoose; + btnChoose.IsSelected = true; + } + break; + case 3: + if (index == 0 + 1) + { + lastButton = btnChoose; + btnChoose.IsSelected = true; + } + break; + } + } var btnPropertyTitle = new Button() { @@ -391,22 +450,24 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, - Tag = hei-1, Text = m }; row.AddChidren(btnPropertyTitle); btnPropertyTitle.MouseUpEventHandler = (sender, e) => { + if (btnChoose.IsSelected) + { + return; + } btnChoose.IsSelected = true; if (lastButton != null) { lastButton.IsSelected = false; } lastButton = btnChoose; - lastData = btnPropertyTitle.Tag.ToString(); lastText = btnPropertyTitle.Text; }; - hei++; + index++; } @@ -423,13 +484,14 @@ }; btnConfrim.MouseUpEventHandler = (sender, e) => { dialog.Close(); - if(titleId == StringId.DoorlockSystemVolume) + var lastData = lastButton.Tag.ToString(); + + if (isDoorlockSystemVolume) { var waitPage = new Loading(); bodyView.AddChidren(waitPage); waitPage.Start(""); - new System.Threading.Thread(() => { try { @@ -462,15 +524,19 @@ switch (sound) { case 0: + doorLockSystemSound.sound = 0; btn.TextID = StringId.Mute; break; case 1: + doorLockSystemSound.sound = 1; btn.TextID = StringId.Low; break; case 2: + doorLockSystemSound.sound = 2; btn.TextID = StringId.Moderate; break; case 3: + doorLockSystemSound.sound = 3; btn.TextID = StringId.High; break; } @@ -550,15 +616,19 @@ switch (lastData) { case "0": + doorbellVol = 3; btn.TextID = StringId.High; break; case "1": + doorbellVol = 2; btn.TextID = StringId.Moderate; break; case "2": + doorbellVol = 1; btn.TextID = StringId.Low; break; case "3": + doorbellVol = 0; btn.TextID = StringId.Mute; break; } diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs index 9f0c115..7ce49b4 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockBatteryManagementPage.cs @@ -16,8 +16,8 @@ public void LoadPage() { - new TopViewDiv(bodyView, Language.StringByID(StringId.AudioSetup)).LoadTopView(); - bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; + new TopViewDiv(bodyView, Language.StringByID(StringId.BatteryManagement)).LoadTopView(); + bodyView.BackgroundColor = CSS_Color.BackgroundColor; var view1 = new FrameLayout() @@ -25,7 +25,7 @@ Y = Application.GetRealHeight(64), Height = Application.GetRealHeight(276), BackgroundColor = CSS_Color.MainBackgroundColor, - BackgroundImagePath = "FunctionIcon/Doorlock/VideoDoorlockBatteryManagementBg.png" + BackgroundImagePath = "FunctionIcon/DoorLock/VideoDoorlockBatteryManagementBg.png"//VideoDoorlockBatteryManagementBg }; bodyView.AddChidren(view1); @@ -75,6 +75,7 @@ TextSize = CSS_FontSize.HeadlineFontSize, TextColor = CSS_Color.FirstLevelTitleColor, Text = "浣庣數閲忚鏄�", + BackgroundColor = CSS_Color.MainBackgroundColor, }; view2.AddChidren(btnTitle2); diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockFaceUnlockTriggerSettingPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockFaceUnlockTriggerSettingPage.cs index 67cc900..73348c9 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockFaceUnlockTriggerSettingPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockFaceUnlockTriggerSettingPage.cs @@ -305,6 +305,7 @@ TextSize = CSS_FontSize.PromptFontSize_FirstLevel, TextColor = CSS_Color.PromptingColor1, TextID = StringId.FaceUnlockNote, + IsMoreLines = true, }; automaitcTipView.AddChidren(btnAutomaitcNote); diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserListPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserListPage.cs index f1b120c..624bc38 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserListPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserListPage.cs @@ -30,13 +30,28 @@ bodyView.BackgroundColor = CSS_Color.BackgroundColor; + contentView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(667 - 70), + Height = Application.GetRealHeight(607 - 70), }; bodyView.AddChidren(contentView); + var btnTip = new Button() + { + Y = Application.GetRealHeight(667 - 70), + Gravity = Gravity.CenterHorizontal, + Width = Application.GetRealWidth(343), + Height = Application.GetRealHeight(60), + TextAlignment = TextAlignment.TopLeft, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.TextualColor, + TextID = StringId.VideoDoorlockManagerTip, + IsMoreLines = true, + }; + bodyView.AddChidren(btnTip); + var waitPage = new Loading(); bodyView.AddChidren(waitPage); waitPage.Start(""); diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs index 9520088..6f1f608 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs @@ -48,6 +48,8 @@ }; bodyView.AddChidren(contentView); + + #region 鐢ㄦ埛鍚嶇О var userNameView = new FrameLayout() { @@ -158,7 +160,7 @@ }; var pa = new PublicAssmebly(); pa.entryMaxLength = 20; - pa.LoadDialog_EditParater(StringId.ChangeName, doorlockUser.lockUserName, callBack, StringId.UesrNameCannotBeEmpty, 0, new List<string>()); + pa.LoadDialog_EditParater(StringId.ChangeName, "", callBack, StringId.UesrNameCannotBeEmpty, 0, new List<string>()); }; btnUserName.MouseUpEventHandler = eventHandler; btnEditUserNameIcon.MouseUpEventHandler = eventHandler; @@ -169,7 +171,7 @@ void initOptionView(bool isEdit) { if(doorlockUser.faceCount == 0&& - doorlockUser.faceCount == 0 && + doorlockUser.fingerCount == 0 && doorlockUser.pwdCount == 0 && doorlockUser.cardCount == 0) { @@ -183,17 +185,17 @@ int childrenViewHeight = Application.GetRealWidth(116); - int permissionsViewHeight = Application.GetRealHeight(291 + 92); + int permissionsViewHeight = Application.GetRealHeight(291 + 92 + 100); if (userPermissionsView!= null) { userPermissionsView.RemoveAll(); if (isEdit) { - permissionsViewHeight = Application.GetRealHeight(391 + 50); + permissionsViewHeight = Application.GetRealHeight(391 + 50 + 100); childrenViewHeight = Application.GetRealWidth(156); } - userPermissionsView.Height = permissionsViewHeight; + userPermissionsView.Height = permissionsViewHeight ; } else { @@ -699,7 +701,7 @@ var delUserView = new FrameLayout() { Y = unlockOptionView.Bottom, - Height = Application.GetRealHeight(110), + Height = Application.GetRealHeight(310), BackgroundColor = CSS_Color.BackgroundColor, }; userPermissionsView.AddChidren(delUserView); -- Gitblit v1.8.0