From a2572dfd5f01df2f8c6980e53ff01d1100fbb5c8 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 05 六月 2023 09:35:26 +0800 Subject: [PATCH] 安卓键盘弹出事件 --- HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL-ON_iOS/Resources/Language.ini | 22 ++ HDL-ON_Android/Assets/Language.ini | 22 ++ HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs | 61 ++++++--- HDL_ON/UI/UI1-Login/LoginPageBLL.cs | 22 ++- HDL_ON/Common/R.cs | 8 + HDL_ON/DAL/Server/HttpServerRequest.cs | 2 HDL_ON/UI/MainPage.cs | 6 HDL_ON/UI/UI1-Login/LoginPage.cs | 41 ++++++ HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs | 140 ++++++++++++----------- HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs | 2 DLL/Shared.Droid.dll | 0 12 files changed, 209 insertions(+), 119 deletions(-) diff --git a/DLL/Shared.Droid.dll b/DLL/Shared.Droid.dll index 19c36b0..9644e79 100644 --- a/DLL/Shared.Droid.dll +++ b/DLL/Shared.Droid.dll Binary files differ diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 718fae7..5edc896 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -611,7 +611,10 @@ 624=Triggered range 625=Residential unbound 626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed? -627=The set time needs to be later than the current time +627=The set time needs to be later than the current time. +628=Temporary password validity period cannot be greater than 24 hours. +629=Successfully unbound the residence. + 2532=Visitor Invitation Record @@ -1892,7 +1895,8 @@ 625=浣忓畢瑙g粦 626=浣忓畢瑙g粦涔嬪悗锛屼綇瀹呭皢浼氫粠浣犵殑璐﹀彿涓Щ闄わ紝纭畾瑕佹搷浣滃悧锛� 627=璁剧疆鐨勬椂闂撮渶瑕佹櫄浜庡綋鍓嶆椂闂� - +628=涓存椂瀵嗙爜鏈夋晥鏈熶笉鑳藉ぇ浜�24灏忔椂銆� +629=浣忓畢瑙g粦鎴愬姛銆� 2532=璁垮閭�璇疯褰� 2533=璁垮绠$悊 @@ -3170,7 +3174,10 @@ 624=Triggered range 625=Residential unbound 626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed? -627=The set time needs to be later than the current time +627=The set time needs to be later than the current time. +628=Temporary password validity period cannot be greater than 24 hours. +629=Successfully unbound the residence. + 2532=Visitor Invitation Record @@ -4444,7 +4451,10 @@ 624=Triggered range 625=Residential unbound 626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed? -627=The set time needs to be later than the current time +627=The set time needs to be later than the current time. +628=Temporary password validity period cannot be greater than 24 hours. +629=Successfully unbound the residence. + @@ -5708,7 +5718,9 @@ 624=Triggered range 625=Residential unbound 626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed? -627=The set time needs to be later than the current time +627=The set time needs to be later than the current time. +628=Temporary password validity period cannot be greater than 24 hours. +629=Successfully unbound the residence. diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 6764ff0..bd9897e 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="1.7.6" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202305231"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.8.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202306011"> <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 718fae7..5edc896 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -611,7 +611,10 @@ 624=Triggered range 625=Residential unbound 626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed? -627=The set time needs to be later than the current time +627=The set time needs to be later than the current time. +628=Temporary password validity period cannot be greater than 24 hours. +629=Successfully unbound the residence. + 2532=Visitor Invitation Record @@ -1892,7 +1895,8 @@ 625=浣忓畢瑙g粦 626=浣忓畢瑙g粦涔嬪悗锛屼綇瀹呭皢浼氫粠浣犵殑璐﹀彿涓Щ闄わ紝纭畾瑕佹搷浣滃悧锛� 627=璁剧疆鐨勬椂闂撮渶瑕佹櫄浜庡綋鍓嶆椂闂� - +628=涓存椂瀵嗙爜鏈夋晥鏈熶笉鑳藉ぇ浜�24灏忔椂銆� +629=浣忓畢瑙g粦鎴愬姛銆� 2532=璁垮閭�璇疯褰� 2533=璁垮绠$悊 @@ -3170,7 +3174,10 @@ 624=Triggered range 625=Residential unbound 626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed? -627=The set time needs to be later than the current time +627=The set time needs to be later than the current time. +628=Temporary password validity period cannot be greater than 24 hours. +629=Successfully unbound the residence. + 2532=Visitor Invitation Record @@ -4444,7 +4451,10 @@ 624=Triggered range 625=Residential unbound 626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed? -627=The set time needs to be later than the current time +627=The set time needs to be later than the current time. +628=Temporary password validity period cannot be greater than 24 hours. +629=Successfully unbound the residence. + @@ -5708,7 +5718,9 @@ 624=Triggered range 625=Residential unbound 626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed? -627=The set time needs to be later than the current time +627=The set time needs to be later than the current time. +628=Temporary password validity period cannot be greater than 24 hours. +629=Successfully unbound the residence. diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index d01a31a..1d4c2ab 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -5,6 +5,14 @@ public static class StringId { /// <summary> + /// 浣忓畢瑙g粦鎴愬姛 + /// </summary> + public const int SuccessfullyUnboundTheResidence = 629; + /// <summary> + /// 涓存椂瀵嗙爜鏈夋晥鏈熶笉鑳藉ぇ浜�24灏忔椂 + /// </summary> + public const int TempPwdValidityTip = 628; + /// <summary> /// 璁剧疆鐨勬椂闂撮渶瑕佹櫄浜庡綋鍓嶆椂闂� /// </summary> public const int TempPwdSettingTip = 627; diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 4909dce..8b4f77b 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -715,7 +715,7 @@ public ResponsePackNew RollBack() { var d = new Dictionary<string, object>(); - d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id); d.Add("communityId", DB_ResidenceData.Instance.CurrentRegion.communityId); d.Add("flowRecordContent", "onPro浜や粯鍥炴粴"); d.Add("projectFlowRecordActionEnum", "DELIVERY_ROLLBACK"); diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index f2dd572..4f1d9af 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -26,7 +26,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.7.6"; + public static string VersionString = "1.8.0"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> @@ -136,8 +136,8 @@ { _RoomNotSupportFunctionList = new List<string>(); _RoomNotSupportFunctionList.Add(SPK.EnergyStandard); - _RoomNotSupportFunctionList.Add(SPK.MusicStandard); - _RoomNotSupportFunctionList.Add(SPK.AvMusic); + //_RoomNotSupportFunctionList.Add(SPK.MusicStandard); + //_RoomNotSupportFunctionList.Add(SPK.AvMusic); _RoomNotSupportFunctionList.Add(SPK.AirSwitch); _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy); //_RoomNotSupportFunctionList.Add(SPK.OtherCommon); diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index 2bb99d6..c5bdf9f 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -24,10 +24,42 @@ pm = new HttpServerRequest(); #if __ANDROID__ BaseActivity.HideKeyboardEvent = () => { - Application.RunOnMainThread(() => + if (this.Y != 0) { - this.Y = 0; - }); + Application.RunOnMainThread(() => + { + try + { + this.Y = 0; + } + catch { } + }); + } + }; + BaseActivity.ShowKeyboardEvent = () => { + try + { + if (etPassword.Foucs) + { + new Thread(() => + { + for (var i = 0; i < 10; i++) + { + Application.RunOnMainThread(() => + { + try + { + this.Y = 0 - Application.GetRealHeight(10 * i); + } + catch { } + }); + Thread.Sleep(10); + } + }) + { IsBackground = true }.Start(); + } + } + catch { } }; BaseActivity.SmsAction = (message) => { Console.WriteLine($"鎺ユ敹鍒扮煭淇★細"+ message); @@ -69,6 +101,7 @@ BaseActivity.HideKeyboardEvent = () => { }; + BaseActivity.ShowKeyboardEvent = () => { }; BaseActivity.SmsAction = (sms) => { }; #endif base.RemoveFromParent(); @@ -253,7 +286,6 @@ //return; if (b) { - //etAccount.Text = "13375012446";//娴嬭瘯鏈嶅姟鍣� //etAccount.Text = "1033326940@qq.com"; //etAccount.Text = "18022428438";//wjc //etAccount.Text = "13602944661";//kx @@ -282,6 +314,7 @@ etAccount.Text = "13549566666"; etAccount.Text = "18316672920"; etAccount.Text = "support7@hdlautomation.com"; + etAccount.Text = "13375012446";//娴嬭瘯鏈嶅姟鍣� } else { diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs index 8515ed2..13fc4ad 100644 --- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs +++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs @@ -445,17 +445,19 @@ { btnPasswordViewBottomLine.BackgroundColor = CSS_Color.MainColor; btnPasswordViewBottomLine.Height = Application.GetRealHeight(2); - new Thread(() => { - for(var i = 0; i < 10; i++) - { - Application.RunOnMainThread(() => - { - this.Y = 0-Application.GetRealHeight(10 * i); - }); - Thread.Sleep(10); - } - }) { IsBackground = true }.Start(); + #if __IOS__ + new Thread(() => { + for(var i = 0; i < 10; i++) + { + Application.RunOnMainThread(() => + { + this.Y = 0-Application.GetRealHeight(10 * i); + }); + Thread.Sleep(10); + } + }) { IsBackground = true }.Start(); + var sst = etPassword.MyTextContentType; Console.WriteLine(sst); etPassword.SetTextContentTypeToOneTimeCode(); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs index f13369a..dc72414 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs @@ -395,6 +395,80 @@ LoadEvent_SkipAdminMigrationConfirmPage(); LoadEvent_SkipTransferConfirmPage(); + + + + var btnRollBack = new Button() + { + Y = Application.GetRealHeight(623), + Height = Application.GetRealHeight(50), + TextAlignment = TextAlignment.Center, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.AuxiliaryColor2, + TextID = StringId.RollBack, + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + bodyView.AddChidren(btnRollBack); + + if (MainPage.Increase) + { + btnRollBack.Y = Application.GetRealHeight(613); + btnRollBack.Height = Application.GetRealHeight(50); + bodyView.AddChidren(new Button() { Y = Application.GetRealHeight(663), Height = Application.GetRealHeight(20), BackgroundColor = CSS_Color.MainBackgroundColor }); + } + btnRollBack.MouseUpEventHandler += (sender, e) => + { + Action okAction = () => + { + var waitPage = new Loading(); + this.AddChidren(waitPage); + waitPage.Start(""); + new System.Threading.Thread(() => { + try + { + var pack = Common.ApiUtlis.Ins.HttpRequest.RollBack(); + Application.RunOnMainThread(() => + { + if (pack != null) + { + if (pack.Code == StateCode.SUCCESS) + { + new PublicAssmebly().TipMsg(StringId.Tip, StringId.SuccessfullyUnboundTheResidence, () => + { + Common.ApiUtlis.Ins.HttpRequest.GetHomePager(); + }); + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); + } + } + }); + } + catch (Exception ex) + { + MainPage.Log($"浣忓畢鍥炴粴寮傚父锛歿ex.Message}"); + } + finally + { + Application.RunOnMainThread(() => + { + try + { + waitPage.Hide(); + waitPage.RemoveFromParent(); + waitPage = null; + } + catch { } + }); + } + }) + { IsBackground = true }.Start(); + }; + new ConfirmDialog().ShowDialog(StringId.Tip, StringId.RollBackTipMsg, okAction); + }; + + } #region 璋冭瘯鏉冮檺 @@ -565,72 +639,6 @@ break; case "ACCEPTANCE"://楠屾敹 btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.ACCEPTANCE); - - var btnRollBack = new Button() - { - Y = Application.GetRealHeight(623), - Height = Application.GetRealHeight(50), - TextAlignment = TextAlignment.Center, - TextSize = CSS_FontSize.SubheadingFontSize, - TextColor = CSS_Color.AuxiliaryColor2, - TextID = StringId.RollBack, - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - bodyView.AddChidren(btnRollBack); - - if (MainPage.Increase) - { - btnRollBack.Y = Application.GetRealHeight(613); - btnRollBack.Height = Application.GetRealHeight(50); - bodyView.AddChidren(new Button() { Y = Application.GetRealHeight(663), Height = Application.GetRealHeight(20), BackgroundColor = CSS_Color.MainBackgroundColor }); - } - btnRollBack.MouseUpEventHandler += (sender, e) => - { - Action okAction = () => - { - var waitPage = new Loading(); - this.AddChidren(waitPage); - waitPage.Start(""); - new System.Threading.Thread(() => { - try - { - var pack = Common.ApiUtlis.Ins.HttpRequest.RollBack(); - Application.RunOnMainThread(() => - { - if (pack != null) - { - if (pack.Code == StateCode.SUCCESS) - { - Common.ApiUtlis.Ins.HttpRequest.GetHomePager(); - } - else - { - IMessageCommon.Current.ShowErrorInfoAlter(pack.Code); - } - } - }); - } - catch (Exception ex) - { - MainPage.Log($"浣忓畢鍥炴粴寮傚父锛歿ex.Message}"); - } - finally - { - Application.RunOnMainThread(() => - { - try - { - waitPage.Hide(); - waitPage.RemoveFromParent(); - waitPage = null; - } - catch { } - }); - } - }) { IsBackground = true }.Start(); - }; - new ConfirmDialog().ShowDialog(StringId.Tip, StringId.RollBackTipMsg, okAction); - }; break; case "To_Be_Accepted"://寰呴獙鏀� diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs index a3d0b18..acf1a0a 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs @@ -856,6 +856,12 @@ HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.EffectiveTimeMustBeOverFailureTime)); return false; } + if ((endTime - startTime).TotalHours>=24) + { + //涓存椂瀵嗙爜鏈夋晥鏈熶笉鑳藉ぇ浜�24灏忔椂 + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.TempPwdValidityTip)); + return false; + } return true; } @@ -887,34 +893,43 @@ /// </summary> private void RefreshFormStatu() { - //濡傛灉涓嶅湪绾� - if (this.doorLockData.IsOnline == false) + try { - //寮�閿佸浘鐗� - this.picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue2.png"; - //杩炴帴鐘舵�� - this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UnConnect.png"; - this.btnOnlineView.Text = this.dicText["鏈繛鎺�"]; - this.btnOnlineView.TextColor = CSS_Color.AuxiliaryColor2; - //甯稿紑妯″紡鍥炬爣 - if (this.btnNormallyOpenIcon != null) + //濡傛灉涓嶅湪绾� + if (this.doorLockData.IsOnline == false) { - this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon2.png"; + //寮�閿佸浘鐗� + this.picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue2.png"; + //杩炴帴鐘舵�� + this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UnConnect.png"; + this.btnOnlineView.Text = this.dicText["鏈繛鎺�"]; + this.btnOnlineView.TextColor = CSS_Color.AuxiliaryColor2; + //甯稿紑妯″紡鍥炬爣 + if (this.btnNormallyOpenIcon != null) + { + this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon2.png"; + } } + else + { + //寮�閿佸浘鐗� + this.picLockControl.UnSelectedImagePath = this.doorLockData.Open == true ? "FunctionIcon/DoorLock/UnLockPictrue3.png" : "FunctionIcon/DoorLock/LockPictrue1.png"; + //杩炴帴鐘舵�� + this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png"; + this.btnOnlineView.Text = this.dicText["宸茶繛鎺�"]; + this.btnOnlineView.TextColor = CSS_Color.PromptingColor1; + //甯稿紑妯″紡鍥炬爣 + if (this.btnNormallyOpenIcon != null) + { + this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon1.png"; + } + } + this.seekBarVoiceControl.Progress = this.doorLockData.Voice; + this.btnVoicePersent.Text = this.doorLockData.Voice.ToString(); } - else + catch (Exception ex) { - //寮�閿佸浘鐗� - this.picLockControl.UnSelectedImagePath = this.doorLockData.Open == true ? "FunctionIcon/DoorLock/UnLockPictrue3.png" : "FunctionIcon/DoorLock/LockPictrue1.png"; - //杩炴帴鐘舵�� - this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png"; - this.btnOnlineView.Text = this.dicText["宸茶繛鎺�"]; - this.btnOnlineView.TextColor = CSS_Color.PromptingColor1; - //甯稿紑妯″紡鍥炬爣 - if (this.btnNormallyOpenIcon != null) - { - this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon1.png"; - } + MainPage.Log($"鐣岄潰鏇存柊寮傚父锛岄棬閿�:{ex.Message}"); } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs index 34ec007..2219b13 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs @@ -175,7 +175,7 @@ { if (TimeCheck) { - if (DateTime.Now > this.selectDateTime) + if (DateTime.Now > this.selectDateTime.AddMinutes(1)) { new PublicAssmebly().TipMsg(StringId.Tip, StringId.TempPwdSettingTip); throw new Exception("stop"); -- Gitblit v1.8.0