From 3aba1c7fea5f0adb1b169e8060ce956188e80a2b Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期二, 24 九月 2024 10:46:18 +0800 Subject: [PATCH] 删除解锁APP的模式 --- HDL-ON_iOS/ViewController.cs | 26 HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs | 924 ++++++------ HDL_ON/Common/ApiUtlis.cs | 45 HDL_ON/UI/UI1-Login/LoginPageBLL.cs | 31 HDL-ON_iOS/AppDelegate.cs | 3 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 4 HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs | 1022 ++++++------ HDL_ON/Common/HDLCommon.cs | 9 HDL_ON/DAL/Server/HttpUtil.cs | 16 HDL_ON/Common/OnAppConfig.cs | 1 HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 1 HDL_ON/UI/UI1-Login/LoginPage.cs | 3 HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs | 850 +++++----- HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs | 1432 +++++++++--------- SiriIntents/Server/HttpUtil.cs | 12 16 files changed, 2,183 insertions(+), 2,198 deletions(-) diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs index 2cd239a..a6a7280 100644 --- a/HDL-ON_iOS/AppDelegate.cs +++ b/HDL-ON_iOS/AppDelegate.cs @@ -410,9 +410,8 @@ { if (pushMes.Extras.Contains("OffLine")) { - //haveToSignOut = true; //寮哄埗涓嬬嚎 - UserInfo.Current.LastTime = DateTime.MinValue; + UserInfo.Current.ValidToken = false; UserInfo.Current.headImagePagePath = "LoginIcon/2.png";//閲嶇疆鐢ㄦ埛澶村儚 UserInfo.Current.SaveUserInfo(); HDLCommon.Current.ShowAlert(Language.StringByID(StringId.LoggedOnOtherDevices)); diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs index 5e5749e..bfddb87 100644 --- a/HDL-ON_iOS/ViewController.cs +++ b/HDL-ON_iOS/ViewController.cs @@ -56,18 +56,20 @@ } //鍚姩鍙嬬洘sdk - new System.Threading.Thread(() => { - while (true) - { - if (OnAppConfig.Instance.IsLogin) - { - //var um = new UMSdk.HDLUMSDK(); - //UMSdk.HDLUMSDK.InitUMSDKWithAppKey("61d56642e0f9bb492bbc3e72", "IOS"); - break; - } - System.Threading.Thread.Sleep(1000); - } - }) { IsBackground = true }.Start(); + //new System.Threading.Thread(() => { + // int count = 0; + // while (count<5) + // { + // count++; + // if (OnAppConfig.Instance.IsLogin) + // { + // var um = new UMSdk.HDLUMSDK(); + // UMSdk.HDLUMSDK.InitUMSDKWithAppKey("61d56642e0f9bb492bbc3e72", "IOS"); + // break; + // } + // System.Threading.Thread.Sleep(1000); + // } + //}) { IsBackground = true }.Start(); diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index 1dc09e1..d4666d5 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -1,7 +1,7 @@ 锘縰sing System; using System.Collections.Generic; -using HDL_ON; -using HDL_ON.DAL; +using System.Net.Http; +using System.Threading.Tasks; using HDL_ON.DAL.Server; using HDL_ON.Entity; using HDL_ON.UI.UI2.FuntionControlView.Video; @@ -76,7 +76,7 @@ /// <summary> /// token鏄惁鏈夋晥 /// </summary> - public bool tokenInvalid = false; + public bool IsValidToken = false; public bool hadInternet = true; /// <summary> @@ -104,12 +104,12 @@ string code = StateCode.SUCCESS; Inverter.Ins.H5Page = null;//閲嶇疆鍏変紡椤甸潰 - var downloadDataThread = new System.Threading.Thread(() => + var downloadDataThread = new System.Threading.Thread(async() => { try { //澧炲姞3绉掍簯鏈嶅姟鍣ㄨ繛鎺ユ娴嬶紝杩炰笉涓婃湇鍔″櫒鐨勬椂鍊欎笉鍒锋柊鏁版嵁 - hadInternet = true; + //hadInternet = true; var dataList = new List<GlobalRegionListRes>(); var requestJson = HttpUtil.GetSignRequestJson(new GetRegionListObj() { regionMark = HttpUtil.RegionMark }); var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GlobalRegionList, requestJson, HttpUtil.GlobalRequestHttpsHost, "", 3); @@ -163,6 +163,7 @@ } finally { + MainPage.Log("鏈嶅姟鍣ㄨ繛鎺ョ姸鎬�:" + hadInternet); if (!hadInternet) { Application.RunOnMainThread(() => @@ -181,7 +182,7 @@ if (code != StateCode.SUCCESS) { DownloadDataComplete = true; - hadInternet = false; + IsValidToken= false; try { var spatialInfoDataBytes = FileUtlis.Files.ReadFile("SpatialInfoData"); @@ -214,14 +215,8 @@ MainPage.Log("Error", $"{this.GetType()}:鍔犺浇缂撳瓨璁惧鏁版嵁寮傚父:{ex.StackTrace}"); } MainPage.Log($"鍒锋柊token澶辫触"); - return; - } - else - { - hadInternet = true; - } - if (code != StateCode.SUCCESS) - { + + if (waitPage != null) { Application.RunOnMainThread(() => @@ -236,6 +231,10 @@ }); } return; + } + else + { + hadInternet = true; } MainPage.Log($"鍒锋柊token鎴愬姛"); //===================鍒锋柊浣忓畢淇℃伅======================= @@ -824,6 +823,24 @@ var pack = Ins.HttpRequest.GetSecurityList(); } + //public async Task<bool> CanConnectToHost() + //{ + // try + // { + // using (HttpClient client = new HttpClient()) + // { + // client.Timeout = TimeSpan.FromSeconds(3); // 瓒呮椂鏃堕棿 + // HttpResponseMessage response = await client.GetAsync(HttpUtil.GlobalRequestHttpsHost); + // return response.IsSuccessStatusCode; + // } + // } + // catch (Exception ex) + // { + // MainPage.Log(ex.StackTrace); + // return false; + // } + //} + } } diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs index 6e58228..5944bdc 100644 --- a/HDL_ON/Common/HDLCommon.cs +++ b/HDL_ON/Common/HDLCommon.cs @@ -537,10 +537,7 @@ switch (UserInfo.Current.AccountString) { case "464027401@qq.com": - case "649362315@qq.com": - case "13580507523": case "15626203746": - case "18316672920": return; } @@ -589,8 +586,10 @@ //2.娉ㄩ攢鎺ㄩ�� new HttpServerRequest().SignOutPush(); //3.璺宠浆鐧诲綍椤甸潰 - UserInfo.Current.LastTime = DateTime.MinValue; + UserInfo.Current.ValidToken = false; UserInfo.Current.SaveUserInfo(); + OnAppConfig.Instance.LastLoginUserId = ""; + OnAppConfig.Instance.SaveConfig(); DB_ResidenceData.Instance.EixtAccount(); MainPage.Log("閫�鍑鸿处鍙锋竻绌烘暟鎹�"); //4.娉ㄩ攢HDLSIP璐﹀彿鐧诲綍 2021-08-20 @@ -644,7 +643,7 @@ public void ShowAlarmPushMessage(JPushMessageInfo jpushMessageInfo, bool isAlarm) { //娌$櫥褰曚笉澶勭悊 - if (UserInfo.Current == null || !UserInfo.Current.IsLogin || MainPage.BasePageView == null) + if (UserInfo.Current == null || MainPage.BasePageView == null) { return; } diff --git a/HDL_ON/Common/OnAppConfig.cs b/HDL_ON/Common/OnAppConfig.cs index 8c86dc0..7dd4117 100644 --- a/HDL_ON/Common/OnAppConfig.cs +++ b/HDL_ON/Common/OnAppConfig.cs @@ -65,7 +65,6 @@ return false; else { - //return (DateTime.Now - LastTime).TotalDays < 7; return true; } } diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 5030f20..5d84f01 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -18,13 +18,13 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - public const string APP_KEY = "HDL-HOME-APP"; - public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; + //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //public const string APP_KEY = "HDL-HOME-APP"; + //public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; - //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; - //public const string APP_KEY = "HDL-HOME-APP-TEST"; - //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; + public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; + public const string APP_KEY = "HDL-HOME-APP-TEST"; + public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm //const string APP_KEY = "CPEVRLRT"; @@ -330,7 +330,7 @@ UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken; UserInfo.Current.AccessToken = revertData.accessToken; UserInfo.Current.RefreshToken = revertData.refreshToken; - UserInfo.Current.LastTime = DateTime.Now; + UserInfo.Current.ValidToken = true; UserInfo.Current.SaveUserInfo(); #if __IOS__ var sdm = new SiriKit.SceneDateManager(); @@ -341,7 +341,7 @@ } else //if (revertObj.Code == StateCode.PasswrodError) { - UserInfo.Current.LastTime = DateTime.MinValue; + UserInfo.Current.ValidToken = false; } return false; } diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index 074f96c..c1afe23 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -320,7 +320,7 @@ etAccount.Text = "13682244600"; etAccount.Text = "pjh@hdlchina.com.cn"; etAccount.Text = "13580507523"; - etAccount.Text = "18475593023"; + //etAccount.Text = "18475593023"; } else { @@ -337,6 +337,7 @@ etAccount.Text = "15626203746"; } + //etAccount.Text = "13580507523"; b = !b; etPassword.Text = "123456"; if (etAccount.Text == "13682244600") diff --git a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs index 58a951b..46c3048 100644 --- a/HDL_ON/UI/UI1-Login/LoginPageBLL.cs +++ b/HDL_ON/UI/UI1-Login/LoginPageBLL.cs @@ -648,24 +648,6 @@ var getResidencesResult = LoadMethod_GetResidences(); if (getResidencesResult) { - /* - * Wait : 鎺ㄩ�佹敞鍐� - */ - - /* - * 鏌ョ湅鏈湴鏄惁瀛樺湪鏁版嵁 - * 瀛樺湪鍒欏鍑� - */ - //var isExis = FileUtils.IsExisFolder(DB_ResidenceData.residenceData.CurReginID); - //if (isExis) - //{ - // FileUtils.DeleteAllFile(); - // string regionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID); - // FileUtils.RestoreRegionFiles(regionRootPath); - // DB_ResidenceData.residenceData.EixtAccount(); - // OnAppConfig.Instance.RefreshUserConfig(); - // SpatialInfo.CurrentSpatial.InitRoomFunction(); - //} Application.RunOnMainThread(() => { //20201223-鐧诲綍鎴愬姛涔嬪悗锛屽皢涓嬭浇鏁版嵁瀹屾垚鏍囪鏍囪涓篺alse锛岄槻姝富椤垫彁鍓嶅姞杞� @@ -677,18 +659,9 @@ } else { - //Application.RunOnMainThread(() => - //{ - // BindingResidencePage page = new BindingResidencePage(); - // MainPage.BaseView.AddChidren(page); - // page.LoadView(); - //}); - - - //2020-11-13 寰呯‘璁� //鑾峰彇浣忓畢澶辫触锛岄噸鏂版爣璁颁负鏈櫥褰曠姸鎬� - UserInfo.Current.LastTime = DateTime.MinValue; + UserInfo.Current.ValidToken = false; UserInfo.Current.SaveUserInfo(); //鐧诲綍澶辫触锛岃鍏堟坊鍔犱綇瀹咃紒 //Utlis.ShowAlertOnMainThread(Language.StringByID(StringId.FailedGetHomeList)); @@ -748,7 +721,7 @@ UserInfo.Current.ClearUserInfo(); UserInfo.Current.userType = revertData.userType; UserInfo.Current.AccountString = account; - UserInfo.Current.LastTime = DateTime.Now; + UserInfo.Current.ValidToken = true; UserInfo.Current.ID = revertData.userId; UserInfo.Current.LoginTokenString = revertData.headerPrefix + revertData.accessToken; UserInfo.Current.AccessToken = revertData.accessToken; diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 4284a3e..e69bd40 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -535,7 +535,7 @@ #region 鍔熻兘鍦烘櫙鍒囨崲 - bodyView.AddChidren(new Button() { Height = Application.GetRealHeight(20), BackgroundColor = 0x00000000 }); + bodyView.AddChidren(new Button() { Height = Application.GetRealHeight(20), BackgroundColor = 0xFFFF0000 }); loadNavView(); diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs index d47510b..dd9844d 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs @@ -271,10 +271,6 @@ { bodyView.divLinkStateTip.Visible = true; } - //else if () - //{ - // bodyView.divLinkStateTip.Visible = true; - //} else { bodyView.divLinkStateTip.Visible = false; diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs index 72e11f2..0a17a85 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs @@ -286,7 +286,6 @@ btnExit.MouseUpEventHandler = (sender, e) => { MainPage.NoLoginMode = false; - UserInfo.Current.ClearUserInfo(); HDLCommon.Current.Logout(); }; bodyView.AddChidren(btnExit); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs index 489d1a5..2a05647 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs @@ -1,462 +1,462 @@ -锘縰sing System; -using HDL_ON.UI.CSS; -using Shared; -using HDL_ON.DAL.Server; +锘�//using System; +//using HDL_ON.UI.CSS; +//using Shared; +//using HDL_ON.DAL.Server; -namespace HDL_ON.UI -{ - /// <summary> - /// 鎵嬪娍瑙i攣 - /// </summary> - public class AppUnlockGesturePage : FrameLayout - { - /// <summary> - /// - /// </summary> - FrameLayout bodyView; - /// <summary> - /// 閿欒鎻愮ず鎸夐挳 - /// </summary> - Button btnTipMsg; +//namespace HDL_ON.UI +//{ +// /// <summary> +// /// 鎵嬪娍瑙i攣 +// /// </summary> +// public class AppUnlockGesturePage : FrameLayout +// { +// /// <summary> +// /// +// /// </summary> +// FrameLayout bodyView; +// /// <summary> +// /// 閿欒鎻愮ず鎸夐挳 +// /// </summary> +// Button btnTipMsg; - string passwrod = ""; - string oldPasswrod = ""; - Action backAction; - public AppUnlockGesturePage(string pw, Action action) - { - bodyView = this; - bodyView.Tag = "unlockpage"; - oldPasswrod = pw; - backAction = action; - } +// string passwrod = ""; +// string oldPasswrod = ""; +// Action backAction; +// public AppUnlockGesturePage(string pw, Action action) +// { +// bodyView = this; +// bodyView.Tag = "unlockpage"; +// oldPasswrod = pw; +// backAction = action; +// } - /// <summary> - /// - /// </summary> - /// <param name="optionType"> - /// 鎿嶄綔鏂瑰紡锛� - /// 1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆; - /// 5:鍏抽棴鎸囩汗ID锛�6:鍏抽棴闈㈠ID;7:瑙i攣楠岃瘉 - /// </param> - public void LoadPage(string optionType) - { - bodyView.BackgroundColor = CSS_Color.BackgroundColor; - //瑙i攣楠岃瘉鏃犳硶鍚庨��锛屽繀椤婚獙璇� - if (optionType != "7") - { - if (oldPasswrod == "") - new TopViewDiv(bodyView, Language.StringByID(StringId.SetGesturePassword)).LoadTopView(); - else - new TopViewDiv(bodyView, Language.StringByID(StringId.VerifyGesturePassword)).LoadTopView(); - } - Button btnGestureIcon = new Button() - { - Y = Application.GetRealHeight(96), - Gravity = Gravity.CenterHorizontal, - Width = Application.GetRealWidth(64), - Height = Application.GetRealWidth(64), - //UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/GestureGrayIcon.png", - }; - bodyView.AddChidren(btnGestureIcon); +// /// <summary> +// /// +// /// </summary> +// /// <param name="optionType"> +// /// 鎿嶄綔鏂瑰紡锛� +// /// 1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆; +// /// 5:鍏抽棴鎸囩汗ID锛�6:鍏抽棴闈㈠ID;7:瑙i攣楠岃瘉 +// /// </param> +// public void LoadPage(string optionType) +// { +// bodyView.BackgroundColor = CSS_Color.BackgroundColor; +// //瑙i攣楠岃瘉鏃犳硶鍚庨��锛屽繀椤婚獙璇� +// if (optionType != "7") +// { +// if (oldPasswrod == "") +// new TopViewDiv(bodyView, Language.StringByID(StringId.SetGesturePassword)).LoadTopView(); +// else +// new TopViewDiv(bodyView, Language.StringByID(StringId.VerifyGesturePassword)).LoadTopView(); +// } +// Button btnGestureIcon = new Button() +// { +// Y = Application.GetRealHeight(96), +// Gravity = Gravity.CenterHorizontal, +// Width = Application.GetRealWidth(64), +// Height = Application.GetRealWidth(64), +// //UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/GestureGrayIcon.png", +// }; +// bodyView.AddChidren(btnGestureIcon); - Button btnTipTitle = new Button() - { - Y = Application.GetRealHeight(4) + btnGestureIcon.Bottom, - TextAlignment = TextAlignment.Center, - Height = Application.GetRealHeight(36), - IsBold = true, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.EmphasisFontSize_Secondary, - TextID = StringId.VerifyGesturePassword, - }; - bodyView.AddChidren(btnTipTitle); +// Button btnTipTitle = new Button() +// { +// Y = Application.GetRealHeight(4) + btnGestureIcon.Bottom, +// TextAlignment = TextAlignment.Center, +// Height = Application.GetRealHeight(36), +// IsBold = true, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.EmphasisFontSize_Secondary, +// TextID = StringId.VerifyGesturePassword, +// }; +// bodyView.AddChidren(btnTipTitle); - btnTipMsg = new Button() - { - Y = btnTipTitle.Bottom, - TextAlignment = TextAlignment.Center, - Height = Application.GetRealHeight(36), - IsBold = true, - TextColor = CSS_Color.TextualColor, - SelectedTextColor = CSS_Color.WarningColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.DrawUnlockPattern, - }; - bodyView.AddChidren(btnTipMsg); +// btnTipMsg = new Button() +// { +// Y = btnTipTitle.Bottom, +// TextAlignment = TextAlignment.Center, +// Height = Application.GetRealHeight(36), +// IsBold = true, +// TextColor = CSS_Color.TextualColor, +// SelectedTextColor = CSS_Color.WarningColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.DrawUnlockPattern, +// }; +// bodyView.AddChidren(btnTipMsg); - if (optionType == "1") - { - btnTipMsg.TextID = string.IsNullOrEmpty(oldPasswrod) ? StringId.DrawUnlockPattern : StringId.DrawUnlockPatternAgain; - //璁剧疆鎵嬪娍瀵嗙爜 - btnTipTitle.TextID = StringId.SetGesturePassword; - }else if(optionType == "2") - { - //璇疯緭鍏ュ師鎵嬪娍瀵嗙爜 - btnTipTitle.TextID = StringId.PleaseDrawTheOriginalGesturePassword; - } +// if (optionType == "1") +// { +// btnTipMsg.TextID = string.IsNullOrEmpty(oldPasswrod) ? StringId.DrawUnlockPattern : StringId.DrawUnlockPatternAgain; +// //璁剧疆鎵嬪娍瀵嗙爜 +// btnTipTitle.TextID = StringId.SetGesturePassword; +// }else if(optionType == "2") +// { +// //璇疯緭鍏ュ師鎵嬪娍瀵嗙爜 +// btnTipTitle.TextID = StringId.PleaseDrawTheOriginalGesturePassword; +// } - //if (optionType == "7") - //{ - // //璇风粯鍒惰В閿佸浘妗� - // btnTipTitle.TextID = StringId.DrawUnlockPattern; - //} +// //if (optionType == "7") +// //{ +// // //璇风粯鍒惰В閿佸浘妗� +// // btnTipTitle.TextID = StringId.DrawUnlockPattern; +// //} - GestureLockView mGestureLockView = new GestureLockView - { - Y = Application.GetRealHeight(260), - Gravity = Gravity.CenterHorizontal, - Width = Application.GetRealWidth(215), - Height = Application.GetRealWidth(215), - LockViewCorrectColor = CSS_Color.MainColor,//0xFF00FF00,//榛樿鍜屾纭� 鏃舵樉绀虹殑棰滆壊 - LockViewErrorColor = 0xFFFF0000, //閿欒鏃� 鏄剧ず鐨勯鑹� - BackgroundColor = CSS_Color.BackgroundColor, - }; - bodyView.AddChidren(mGestureLockView); - mGestureLockView.SetSolidType(true); - //婊戝姩缁撴潫 鍥炶皟瀵嗙爜缁撴灉鍜屽瘑鐮侀暱搴� - mGestureLockView.OnLockVerifyEvent += (selectNumStr, selectCount) => - { - //鑷楠岃瘉瀵嗙爜锛屾彁绀烘纭垨鑰呴敊璇� false涓烘樉绀虹孩鑹查敊璇�, 鑷閫夋嫨璋冪敤鏃舵満 - mGestureLockView.showCorrectStatus(false); - if (selectCount < 4) - { - btnTipMsg.Text = Language.StringByID(StringId.DrawingLengthError); - btnTipMsg.TextColor = CSS_Color.WarningColor; - return; - } +// GestureLockView mGestureLockView = new GestureLockView +// { +// Y = Application.GetRealHeight(260), +// Gravity = Gravity.CenterHorizontal, +// Width = Application.GetRealWidth(215), +// Height = Application.GetRealWidth(215), +// LockViewCorrectColor = CSS_Color.MainColor,//0xFF00FF00,//榛樿鍜屾纭� 鏃舵樉绀虹殑棰滆壊 +// LockViewErrorColor = 0xFFFF0000, //閿欒鏃� 鏄剧ず鐨勯鑹� +// BackgroundColor = CSS_Color.BackgroundColor, +// }; +// bodyView.AddChidren(mGestureLockView); +// mGestureLockView.SetSolidType(true); +// //婊戝姩缁撴潫 鍥炶皟瀵嗙爜缁撴灉鍜屽瘑鐮侀暱搴� +// mGestureLockView.OnLockVerifyEvent += (selectNumStr, selectCount) => +// { +// //鑷楠岃瘉瀵嗙爜锛屾彁绀烘纭垨鑰呴敊璇� false涓烘樉绀虹孩鑹查敊璇�, 鑷閫夋嫨璋冪敤鏃舵満 +// mGestureLockView.showCorrectStatus(false); +// if (selectCount < 4) +// { +// btnTipMsg.Text = Language.StringByID(StringId.DrawingLengthError); +// btnTipMsg.TextColor = CSS_Color.WarningColor; +// return; +// } - passwrod = selectNumStr; +// passwrod = selectNumStr; - if (string.IsNullOrEmpty(oldPasswrod)) - { - this.RemoveFromParent(); - var page = new AppUnlockGesturePage(passwrod, backAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(optionType); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - else - { - //2020-12-11 瀵嗙爜鏍¢獙 - if (passwrod == oldPasswrod) - { - //瀵嗙爜楠岃瘉閫氳繃 - PasswordInputPassed(optionType); - } - else - { - //瀵嗙爜楠岃瘉澶辫触 - PasswordInputError(optionType); - } +// if (string.IsNullOrEmpty(oldPasswrod)) +// { +// this.RemoveFromParent(); +// var page = new AppUnlockGesturePage(passwrod, backAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(optionType); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// else +// { +// //2020-12-11 瀵嗙爜鏍¢獙 +// if (passwrod == oldPasswrod) +// { +// //瀵嗙爜楠岃瘉閫氳繃 +// PasswordInputPassed(optionType); +// } +// else +// { +// //瀵嗙爜楠岃瘉澶辫触 +// PasswordInputError(optionType); +// } - } +// } - }; +// }; - if (optionType == "7") - { - //浣跨敤璐︽埛瀵嗙爜鐧诲綍鎸夐挳 鎻愮ず鎸夐挳 - AddLoginTipButton(); - } - else if (optionType != "1") - { - //杈撳叆鐧诲綍瀵嗙爜楠岃瘉 鎻愮ず鎸夐挳 - AddInputPasswordTipButton(optionType); - } +// if (optionType == "7") +// { +// //浣跨敤璐︽埛瀵嗙爜鐧诲綍鎸夐挳 鎻愮ず鎸夐挳 +// AddLoginTipButton(); +// } +// else if (optionType != "1") +// { +// //杈撳叆鐧诲綍瀵嗙爜楠岃瘉 鎻愮ず鎸夐挳 +// AddInputPasswordTipButton(optionType); +// } - //if (optionType == "5" || optionType == "6" || optionType == "7") - //{ - // Button btnLoginAccountVerify = new Button() - // { - // Y = Application.GetRealHeight(517), - // Height = Application.GetRealHeight(60), - // TextAlignment = TextAlignment.Center, - // TextSize = CSS_FontSize.TextFontSize, - // TextColor = CSS_Color.MainColor, - // TextID = StringId.EnterLoginPasswordVerification, - // }; - // bodyView.AddChidren(btnLoginAccountVerify); +// //if (optionType == "5" || optionType == "6" || optionType == "7") +// //{ +// // Button btnLoginAccountVerify = new Button() +// // { +// // Y = Application.GetRealHeight(517), +// // Height = Application.GetRealHeight(60), +// // TextAlignment = TextAlignment.Center, +// // TextSize = CSS_FontSize.TextFontSize, +// // TextColor = CSS_Color.MainColor, +// // TextID = StringId.EnterLoginPasswordVerification, +// // }; +// // bodyView.AddChidren(btnLoginAccountVerify); - // btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => - // { - // if (optionType == "7") - // { - // MainPage.GoLoginPage(UserInfo.Current); - // } - // else - // { - // Action<string> action = (pw) => - // { - // var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); - // if (resultObj.Code == StateCode.SUCCESS) - // { - // UserInfo.Current.appUnlockPasswrod = ""; - // UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>(); - // UserInfo.Current.SaveUserInfo(); - // this.RemoveFromParent(); - // backAction(); - // } - // else - // { - // //鐧诲綍澶辫触 - // IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); - // } +// // btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => +// // { +// // if (optionType == "7") +// // { +// // MainPage.GoLoginPage(UserInfo.Current); +// // } +// // else +// // { +// // Action<string> action = (pw) => +// // { +// // var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); +// // if (resultObj.Code == StateCode.SUCCESS) +// // { +// // UserInfo.Current.appUnlockPasswrod = ""; +// // UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>(); +// // UserInfo.Current.SaveUserInfo(); +// // this.RemoveFromParent(); +// // backAction(); +// // } +// // else +// // { +// // //鐧诲綍澶辫触 +// // IMessageCommon.Current.ShowErrorInfoAlter(resultObj.Code); +// // } - // }; - // new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action, StringId.PlsEntryPassword, 0, new System.Collections.Generic.List<string>(), true); - // } - // }; - //} - } +// // }; +// // new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action, StringId.PlsEntryPassword, 0, new System.Collections.Generic.List<string>(), true); +// // } +// // }; +// //} +// } - /// <summary> - /// 鎵嬪娍瀵嗙爜杈撳叆閿欒鏄剧ず閿欒淇℃伅 - /// </summary> - /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> - void PasswordInputError(string optionType) - { - int errorTextID = 0; - if (optionType == "1") - { - //2娆$粯鍒剁偣鍥炬涓嶄竴鑷达紝璇烽噸鏂扮粯鍒� - errorTextID = StringId.DrawingInconsistencyError; - } - else - { - //楠岃瘉澶辫触锛屽瘑鐮侀敊璇�. - errorTextID = StringId.AuthenticationFailedPasswordError; - } +// /// <summary> +// /// 鎵嬪娍瀵嗙爜杈撳叆閿欒鏄剧ず閿欒淇℃伅 +// /// </summary> +// /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> +// void PasswordInputError(string optionType) +// { +// int errorTextID = 0; +// if (optionType == "1") +// { +// //2娆$粯鍒剁偣鍥炬涓嶄竴鑷达紝璇烽噸鏂扮粯鍒� +// errorTextID = StringId.DrawingInconsistencyError; +// } +// else +// { +// //楠岃瘉澶辫触锛屽瘑鐮侀敊璇�. +// errorTextID = StringId.AuthenticationFailedPasswordError; +// } - btnTipMsg.TextID = errorTextID; - btnTipMsg.IsSelected = true; - btnTipMsg.Visible = true; - } +// btnTipMsg.TextID = errorTextID; +// btnTipMsg.IsSelected = true; +// btnTipMsg.Visible = true; +// } - /// <summary> - /// 鎵嬪娍瀵嗙爜楠岃瘉閫氳繃鍚庣殑鎿嶄綔 - /// </summary> - /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> - void PasswordInputPassed(string optionType) - { - if (optionType == "1") - { - //璁剧疆瀵嗙爜 楠岃瘉閫氳繃 - this.RemoveFromParent(); - var page = new OperationResultDisPalyPage(); - page.Show(); - page.LoadPage(true, Language.StringByID(StringId.SetSuccessfully), Language.StringByID(StringId.SetSuccessfully), ""); - //page.LoadPage(true, Language.StringByID(StringId.SetSuccessfully), Language.StringByID(StringId.SetSuccessfully), ""); - string tipMsg = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? Language.StringByID(StringId.TurnOnFingerprintUnlocking) : - Language.StringByID(StringId.TurnOnFaceIdUnlocking); - if (TouchIDUtils.getTouchIDSupperType() != TouchIDUtils.TouchIDSupperType.None) - { - var unlockType = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? "3" : "4"; +// /// <summary> +// /// 鎵嬪娍瀵嗙爜楠岃瘉閫氳繃鍚庣殑鎿嶄綔 +// /// </summary> +// /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> +// void PasswordInputPassed(string optionType) +// { +// if (optionType == "1") +// { +// //璁剧疆瀵嗙爜 楠岃瘉閫氳繃 +// this.RemoveFromParent(); +// var page = new OperationResultDisPalyPage(); +// page.Show(); +// page.LoadPage(true, Language.StringByID(StringId.SetSuccessfully), Language.StringByID(StringId.SetSuccessfully), ""); +// //page.LoadPage(true, Language.StringByID(StringId.SetSuccessfully), Language.StringByID(StringId.SetSuccessfully), ""); +// string tipMsg = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? Language.StringByID(StringId.TurnOnFingerprintUnlocking) : +// Language.StringByID(StringId.TurnOnFaceIdUnlocking); +// if (TouchIDUtils.getTouchIDSupperType() != TouchIDUtils.TouchIDSupperType.None) +// { +// var unlockType = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? "3" : "4"; - //濡傛灉涔嬪墠娌¤缃寚绾规垨鑰呴潰瀹笽D鎵嶆樉绀烘槸鍚﹀紑鍚� - if (!UserInfo.Current.appUnlockType.Contains(unlockType)) - { - Action<bool> action = (result) => - { - if (result) - { - if (!UserInfo.Current.appUnlockType.Contains(unlockType)) - { - UserInfo.Current.appUnlockType.Add(unlockType); - } - } - else - { - if (UserInfo.Current.appUnlockType.Contains(unlockType)) - { - UserInfo.Current.appUnlockType.Remove(unlockType); - } - } - UserInfo.Current.SaveUserInfo(); - backAction(); - }; - page.AdditionalOperations(tipMsg, action); - } - } - if (!UserInfo.Current.appUnlockType.Contains("2")) - { - UserInfo.Current.appUnlockType.Add("2"); - } - UserInfo.Current.appUnlockPasswrod = passwrod; - UserInfo.Current.SaveUserInfo(); - backAction(); - } - else if (optionType == "2") - { - //楠岃瘉瀵嗙爜閫氳繃 - //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇 - this.RemoveFromParent(); - var page = new AppUnlockGesturePage("", backAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("1"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - else if (optionType == "3" || optionType == "4") - { - //3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆 閫氳繃 - if (optionType == "4") - { - backAction(); - this.RemoveFromParent(); - return; - } - if (UserInfo.Current.appUnlockType.Contains("2")) - { - UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>(); - UserInfo.Current.appUnlockPasswrod = ""; - UserInfo.Current.SaveUserInfo(); - this.RemoveFromParent(); - backAction(); - } +// //濡傛灉涔嬪墠娌¤缃寚绾规垨鑰呴潰瀹笽D鎵嶆樉绀烘槸鍚﹀紑鍚� +// if (!UserInfo.Current.appUnlockType.Contains(unlockType)) +// { +// Action<bool> action = (result) => +// { +// if (result) +// { +// if (!UserInfo.Current.appUnlockType.Contains(unlockType)) +// { +// UserInfo.Current.appUnlockType.Add(unlockType); +// } +// } +// else +// { +// if (UserInfo.Current.appUnlockType.Contains(unlockType)) +// { +// UserInfo.Current.appUnlockType.Remove(unlockType); +// } +// } +// UserInfo.Current.SaveUserInfo(); +// backAction(); +// }; +// page.AdditionalOperations(tipMsg, action); +// } +// } +// if (!UserInfo.Current.appUnlockType.Contains("2")) +// { +// UserInfo.Current.appUnlockType.Add("2"); +// } +// UserInfo.Current.appUnlockPasswrod = passwrod; +// UserInfo.Current.SaveUserInfo(); +// backAction(); +// } +// else if (optionType == "2") +// { +// //楠岃瘉瀵嗙爜閫氳繃 +// //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇 +// this.RemoveFromParent(); +// var page = new AppUnlockGesturePage("", backAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("1"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// else if (optionType == "3" || optionType == "4") +// { +// //3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆 閫氳繃 +// if (optionType == "4") +// { +// backAction(); +// this.RemoveFromParent(); +// return; +// } +// if (UserInfo.Current.appUnlockType.Contains("2")) +// { +// UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>(); +// UserInfo.Current.appUnlockPasswrod = ""; +// UserInfo.Current.SaveUserInfo(); +// this.RemoveFromParent(); +// backAction(); +// } - } - else if (optionType == "5") - { - //5:鎸囩汗ID寮�鍏� 閫氳繃 - if (UserInfo.Current.appUnlockType.Contains("3")) - UserInfo.Current.appUnlockType.Remove("3"); - else - UserInfo.Current.appUnlockType.Add("3"); +// } +// else if (optionType == "5") +// { +// //5:鎸囩汗ID寮�鍏� 閫氳繃 +// if (UserInfo.Current.appUnlockType.Contains("3")) +// UserInfo.Current.appUnlockType.Remove("3"); +// else +// UserInfo.Current.appUnlockType.Add("3"); - UserInfo.Current.SaveUserInfo(); - this.RemoveFromParent(); - backAction(); - } - else if (optionType == "6") - { - //6:闈㈠ID寮�鍏� 閫氳繃 - if (UserInfo.Current.appUnlockType.Contains("4")) - UserInfo.Current.appUnlockType.Remove("4"); - else - UserInfo.Current.appUnlockType.Add("4"); +// UserInfo.Current.SaveUserInfo(); +// this.RemoveFromParent(); +// backAction(); +// } +// else if (optionType == "6") +// { +// //6:闈㈠ID寮�鍏� 閫氳繃 +// if (UserInfo.Current.appUnlockType.Contains("4")) +// UserInfo.Current.appUnlockType.Remove("4"); +// else +// UserInfo.Current.appUnlockType.Add("4"); - UserInfo.Current.SaveUserInfo(); - this.RemoveFromParent(); +// UserInfo.Current.SaveUserInfo(); +// this.RemoveFromParent(); - } - else if (optionType == "7") - { - //7:瑙i攣楠岃瘉 閫氳繃 - this.RemoveFromParent(); - backAction(); - } - } +// } +// else if (optionType == "7") +// { +// //7:瑙i攣楠岃瘉 閫氳繃 +// this.RemoveFromParent(); +// backAction(); +// } +// } - /// <summary> - /// 浣跨敤璐︽埛瀵嗙爜鐧诲綍鎸夐挳 鎻愮ず鎸夐挳 - /// </summary> - void AddLoginTipButton() - { - Button btnLoginAccountVerify = new Button() - { - Y = Application.GetRealHeight(517), - Height = Application.GetRealHeight(60), - TextAlignment = TextAlignment.Center, - TextSize = CSS_FontSize.TextFontSize, - TextColor = CSS_Color.MainColor, - TextID = StringId.LogWithAccountAndPassword, - }; - bodyView.AddChidren(btnLoginAccountVerify); +// /// <summary> +// /// 浣跨敤璐︽埛瀵嗙爜鐧诲綍鎸夐挳 鎻愮ず鎸夐挳 +// /// </summary> +// void AddLoginTipButton() +// { +// Button btnLoginAccountVerify = new Button() +// { +// Y = Application.GetRealHeight(517), +// Height = Application.GetRealHeight(60), +// TextAlignment = TextAlignment.Center, +// TextSize = CSS_FontSize.TextFontSize, +// TextColor = CSS_Color.MainColor, +// TextID = StringId.LogWithAccountAndPassword, +// }; +// bodyView.AddChidren(btnLoginAccountVerify); - btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => - { - //閫�鍑虹櫥褰� - HDLCommon.Current.Logout(); - }; - } +// btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => +// { +// //閫�鍑虹櫥褰� +// HDLCommon.Current.Logout(); +// }; +// } - /// <summary> - /// 杈撳叆鐧诲綍瀵嗙爜楠岃瘉 鎻愮ず鎸夐挳 - /// </summary> - void AddInputPasswordTipButton(string optionType) - { - Button btnLoginAccountVerify = new Button() - { - Y = Application.GetRealHeight(517), - Height = Application.GetRealHeight(60), - TextAlignment = TextAlignment.Center, - TextSize = CSS_FontSize.TextFontSize, - TextColor = CSS_Color.MainColor, - TextID = StringId.EnterLoginPasswordVerification, - }; - bodyView.AddChidren(btnLoginAccountVerify); +// /// <summary> +// /// 杈撳叆鐧诲綍瀵嗙爜楠岃瘉 鎻愮ず鎸夐挳 +// /// </summary> +// void AddInputPasswordTipButton(string optionType) +// { +// Button btnLoginAccountVerify = new Button() +// { +// Y = Application.GetRealHeight(517), +// Height = Application.GetRealHeight(60), +// TextAlignment = TextAlignment.Center, +// TextSize = CSS_FontSize.TextFontSize, +// TextColor = CSS_Color.MainColor, +// TextID = StringId.EnterLoginPasswordVerification, +// }; +// bodyView.AddChidren(btnLoginAccountVerify); - btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => - { - //杈撳叆鐧诲綍瀵嗙爜楠岃瘉 - Action<string> action = (pw) => - { - AuthenticationByLoginPassword(pw, optionType); - //var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); - //if (resultObj.Code == StateCode.SUCCESS) - //{ - // PasswordInputPassed(optionType); - //} - //else - //{ - // Application.RunOnMainThread(() => - // { - // Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); - // }); - //} +// btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => +// { +// //杈撳叆鐧诲綍瀵嗙爜楠岃瘉 +// Action<string> action = (pw) => +// { +// AuthenticationByLoginPassword(pw, optionType); +// //var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); +// //if (resultObj.Code == StateCode.SUCCESS) +// //{ +// // PasswordInputPassed(optionType); +// //} +// //else +// //{ +// // Application.RunOnMainThread(() => +// // { +// // Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); +// // }); +// //} - }; - new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action, StringId.PlsEntryPassword, 0, new System.Collections.Generic.List<string>(), true); - }; - } +// }; +// new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action, StringId.PlsEntryPassword, 0, new System.Collections.Generic.List<string>(), true); +// }; +// } - /// <summary> - /// 鐧诲綍瀵嗙爜楠岃瘉 - /// </summary> - /// <param name="pw"></param> - /// <param name="optionType"></param> - void AuthenticationByLoginPassword(string pw, string optionType) - { - var waitPage = new Loading(); - bodyView.AddChidren(waitPage); - waitPage.Start(Language.StringByID(StringId.PleaseWait)); +// /// <summary> +// /// 鐧诲綍瀵嗙爜楠岃瘉 +// /// </summary> +// /// <param name="pw"></param> +// /// <param name="optionType"></param> +// void AuthenticationByLoginPassword(string pw, string optionType) +// { +// var waitPage = new Loading(); +// bodyView.AddChidren(waitPage); +// waitPage.Start(Language.StringByID(StringId.PleaseWait)); - new System.Threading.Thread(() => - { - try - { - var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); - Application.RunOnMainThread(() => - { - if (resultObj.Code == StateCode.SUCCESS) - { - PasswordInputPassed(optionType); - } - else - { - Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); - } - }); - } - catch { } - finally - { - Application.RunOnMainThread(() => - { - if (waitPage != null) - { - waitPage.RemoveFromParent(); - waitPage = null; - } - }); - } - }) - { IsBackground = true }.Start(); - } - } -} \ No newline at end of file +// new System.Threading.Thread(() => +// { +// try +// { +// var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); +// Application.RunOnMainThread(() => +// { +// if (resultObj.Code == StateCode.SUCCESS) +// { +// PasswordInputPassed(optionType); +// } +// else +// { +// Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); +// } +// }); +// } +// catch { } +// finally +// { +// Application.RunOnMainThread(() => +// { +// if (waitPage != null) +// { +// waitPage.RemoveFromParent(); +// waitPage = null; +// } +// }); +// } +// }) +// { IsBackground = true }.Start(); +// } +// } +//} \ No newline at end of file diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs index ccb481a..1078754 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs @@ -1,503 +1,503 @@ -锘縰sing System; -using Shared; -using HDL_ON.UI.CSS; -using HDL_ON.DAL.Server; +锘�//using System; +//using Shared; +//using HDL_ON.UI.CSS; +//using HDL_ON.DAL.Server; -namespace HDL_ON.UI -{ - /// <summary> - /// 瀵嗙爜瑙i攣 - /// </summary> - public partial class AppUnlockPasswordPage : FrameLayout - { - FrameLayout bodyView; - EditText etPassword; - /// <summary> - /// - /// </summary> - Button btnTipError; +//namespace HDL_ON.UI +//{ +// /// <summary> +// /// 瀵嗙爜瑙i攣 +// /// </summary> +// public partial class AppUnlockPasswordPage : FrameLayout +// { +// FrameLayout bodyView; +// EditText etPassword; +// /// <summary> +// /// +// /// </summary> +// Button btnTipError; - string passwrod = ""; - string oldPasswrod = ""; - Action backAction; - public AppUnlockPasswordPage(string pw, Action action) - { - bodyView = this; - bodyView.Tag = "unlockpage"; - oldPasswrod = pw; - backAction = action; - } +// string passwrod = ""; +// string oldPasswrod = ""; +// Action backAction; +// public AppUnlockPasswordPage(string pw, Action action) +// { +// bodyView = this; +// bodyView.Tag = "unlockpage"; +// oldPasswrod = pw; +// backAction = action; +// } - /// <summary> - /// - /// </summary> - /// <param name="optionType"> - /// 鎿嶄綔鏂瑰紡锛� - /// 1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆; - /// 5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉 - /// </param> - public void LoadPage(string optionType) - { - bodyView.BackgroundColor = CSS_Color.BackgroundColor; - //瑙i攣楠岃瘉鏃犳硶鍚庨��锛屽繀椤婚獙璇� - if (optionType != "7") - { - if (oldPasswrod == "") - new TopViewDiv(bodyView, Language.StringByID(StringId.SetDigitalPassword)).LoadTopView(); - else - new TopViewDiv(bodyView, Language.StringByID(StringId.VerifyDigitalPassword)).LoadTopView(); - } +// /// <summary> +// /// +// /// </summary> +// /// <param name="optionType"> +// /// 鎿嶄綔鏂瑰紡锛� +// /// 1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆; +// /// 5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉 +// /// </param> +// public void LoadPage(string optionType) +// { +// bodyView.BackgroundColor = CSS_Color.BackgroundColor; +// //瑙i攣楠岃瘉鏃犳硶鍚庨��锛屽繀椤婚獙璇� +// if (optionType != "7") +// { +// if (oldPasswrod == "") +// new TopViewDiv(bodyView, Language.StringByID(StringId.SetDigitalPassword)).LoadTopView(); +// else +// new TopViewDiv(bodyView, Language.StringByID(StringId.VerifyDigitalPassword)).LoadTopView(); +// } - var btnTipTitle = new Button() - { - Y = Application.GetRealWidth(186), - Height = Application.GetRealWidth(42), - TextAlignment = TextAlignment.Center, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.SubheadingFontSize, - TextID = string.IsNullOrEmpty(oldPasswrod) ? StringId.PlsEntryPassword : StringId.PlsRegisterRepeatPassword, - }; - bodyView.AddChidren(btnTipTitle); +// var btnTipTitle = new Button() +// { +// Y = Application.GetRealWidth(186), +// Height = Application.GetRealWidth(42), +// TextAlignment = TextAlignment.Center, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.SubheadingFontSize, +// TextID = string.IsNullOrEmpty(oldPasswrod) ? StringId.PlsEntryPassword : StringId.PlsRegisterRepeatPassword, +// }; +// bodyView.AddChidren(btnTipTitle); - if (optionType == "1") - { - btnTipTitle.TextID = string.IsNullOrEmpty(oldPasswrod) ? StringId.PlsEntryPassword : StringId.PlsRegisterRepeatPassword; - } - else if (optionType == "2") - { - btnTipTitle.TextID = StringId.PleaseEnterTheOriginalDigitalPassword; - } - else - { - btnTipTitle.TextID = StringId.PlsEntryPassword; - } +// if (optionType == "1") +// { +// btnTipTitle.TextID = string.IsNullOrEmpty(oldPasswrod) ? StringId.PlsEntryPassword : StringId.PlsRegisterRepeatPassword; +// } +// else if (optionType == "2") +// { +// btnTipTitle.TextID = StringId.PleaseEnterTheOriginalDigitalPassword; +// } +// else +// { +// btnTipTitle.TextID = StringId.PlsEntryPassword; +// } - var btnTipIcon1 = new Button() - { - X = Application.GetRealWidth(132), - Y = Application.GetRealWidth(238), - Width = Application.GetRealWidth(16), - Height = Application.GetRealWidth(16), - BorderColor = CSS_Color.FirstLevelTitleColor, - BorderWidth = (uint)Application.GetRealWidth(1), - Radius = (uint)Application.GetRealWidth(8), - BackgroundColor = CSS_Color.MainBackgroundColor, - SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor, - }; - bodyView.AddChidren(btnTipIcon1); +// var btnTipIcon1 = new Button() +// { +// X = Application.GetRealWidth(132), +// Y = Application.GetRealWidth(238), +// Width = Application.GetRealWidth(16), +// Height = Application.GetRealWidth(16), +// BorderColor = CSS_Color.FirstLevelTitleColor, +// BorderWidth = (uint)Application.GetRealWidth(1), +// Radius = (uint)Application.GetRealWidth(8), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor, +// }; +// bodyView.AddChidren(btnTipIcon1); - var btnTipIcon2 = new Button() - { - X = btnTipIcon1.Right + Application.GetRealWidth(16), - Y = Application.GetRealWidth(238), - Width = Application.GetRealWidth(16), - Height = Application.GetRealWidth(16), - BorderColor = CSS_Color.FirstLevelTitleColor, - BorderWidth = (uint)Application.GetRealWidth(1), - Radius = (uint)Application.GetRealWidth(8), - BackgroundColor = CSS_Color.MainBackgroundColor, - SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor, - }; - bodyView.AddChidren(btnTipIcon2); +// var btnTipIcon2 = new Button() +// { +// X = btnTipIcon1.Right + Application.GetRealWidth(16), +// Y = Application.GetRealWidth(238), +// Width = Application.GetRealWidth(16), +// Height = Application.GetRealWidth(16), +// BorderColor = CSS_Color.FirstLevelTitleColor, +// BorderWidth = (uint)Application.GetRealWidth(1), +// Radius = (uint)Application.GetRealWidth(8), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor, +// }; +// bodyView.AddChidren(btnTipIcon2); - var btnTipIcon3 = new Button() - { - X = btnTipIcon2.Right + Application.GetRealWidth(16), - Y = Application.GetRealWidth(238), - Width = Application.GetRealWidth(16), - Height = Application.GetRealWidth(16), - BorderColor = CSS_Color.FirstLevelTitleColor, - BorderWidth = (uint)Application.GetRealWidth(1), - Radius = (uint)Application.GetRealWidth(8), - BackgroundColor = CSS_Color.MainBackgroundColor, - SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor, - }; - bodyView.AddChidren(btnTipIcon3); +// var btnTipIcon3 = new Button() +// { +// X = btnTipIcon2.Right + Application.GetRealWidth(16), +// Y = Application.GetRealWidth(238), +// Width = Application.GetRealWidth(16), +// Height = Application.GetRealWidth(16), +// BorderColor = CSS_Color.FirstLevelTitleColor, +// BorderWidth = (uint)Application.GetRealWidth(1), +// Radius = (uint)Application.GetRealWidth(8), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor, +// }; +// bodyView.AddChidren(btnTipIcon3); - var btnTipIcon4 = new Button() - { - X = btnTipIcon3.Right + Application.GetRealWidth(16), - Y = Application.GetRealWidth(238), - Width = Application.GetRealWidth(16), - Height = Application.GetRealWidth(16), - BorderColor = CSS_Color.FirstLevelTitleColor, - BorderWidth = (uint)Application.GetRealWidth(1), - Radius = (uint)Application.GetRealWidth(8), - BackgroundColor = CSS_Color.MainBackgroundColor, - SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor, - }; - bodyView.AddChidren(btnTipIcon4); +// var btnTipIcon4 = new Button() +// { +// X = btnTipIcon3.Right + Application.GetRealWidth(16), +// Y = Application.GetRealWidth(238), +// Width = Application.GetRealWidth(16), +// Height = Application.GetRealWidth(16), +// BorderColor = CSS_Color.FirstLevelTitleColor, +// BorderWidth = (uint)Application.GetRealWidth(1), +// Radius = (uint)Application.GetRealWidth(8), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor, +// }; +// bodyView.AddChidren(btnTipIcon4); - btnTipError = new Button() - { - Y = Application.GetRealWidth(258), - Height = Application.GetRealWidth(40), - TextAlignment = TextAlignment.Center, - TextColor = CSS_Color.WarningColor, - TextSize = CSS_FontSize.TextFontSize, - Visible = false, - }; - bodyView.AddChidren(btnTipError); +// btnTipError = new Button() +// { +// Y = Application.GetRealWidth(258), +// Height = Application.GetRealWidth(40), +// TextAlignment = TextAlignment.Center, +// TextColor = CSS_Color.WarningColor, +// TextSize = CSS_FontSize.TextFontSize, +// Visible = false, +// }; +// bodyView.AddChidren(btnTipError); - etPassword = new EditText() - { - Y = Application.GetRealWidth(100), - Height = 1, - Foucs = true, - //Visible = false, - IsNumberKeyboardType = true, - }; - bodyView.AddChidren(etPassword); +// etPassword = new EditText() +// { +// Y = Application.GetRealWidth(100), +// Height = 1, +// Foucs = true, +// //Visible = false, +// IsNumberKeyboardType = true, +// }; +// bodyView.AddChidren(etPassword); - //etPassword.MouseUpEventHandler = (sender, e) => { }; +// //etPassword.MouseUpEventHandler = (sender, e) => { }; - etPassword.TextChangeEventHandler = (sender, e) => - { - passwrod = etPassword.Text.Trim(); - switch (etPassword.Text.Trim().Length) - { - case 0: - btnTipIcon1.IsSelected = false; - btnTipIcon2.IsSelected = false; - btnTipIcon3.IsSelected = false; - btnTipIcon4.IsSelected = false; - break; - case 1: - btnTipIcon1.IsSelected = true; - btnTipIcon2.IsSelected = false; - btnTipIcon3.IsSelected = false; - btnTipIcon4.IsSelected = false; - btnTipError.Visible = false; - break; - case 2: - btnTipIcon1.IsSelected = true; - btnTipIcon2.IsSelected = true; - btnTipIcon3.IsSelected = false; - btnTipIcon4.IsSelected = false; - break; - case 3: - btnTipIcon1.IsSelected = true; - btnTipIcon2.IsSelected = true; - btnTipIcon3.IsSelected = true; - btnTipIcon4.IsSelected = false; - break; - case 4: - btnTipIcon1.IsSelected = true; - btnTipIcon2.IsSelected = true; - btnTipIcon3.IsSelected = true; - btnTipIcon4.IsSelected = true; - Application.HideSoftInput(); - if (string.IsNullOrEmpty(oldPasswrod)) - { - //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇 - this.RemoveFromParent(); - var page = new AppUnlockPasswordPage(passwrod, backAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(optionType); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - else - { - //2020-12-11 瀵嗙爜鏍¢獙 - if (passwrod == oldPasswrod) - { - //瀵嗙爜楠岃瘉閫氳繃 - PasswordInputPassed(optionType); - } - else - { - //瀵嗙爜楠岃瘉澶辫触 - PasswordInputError(optionType); - } - } - break; - } - }; +// etPassword.TextChangeEventHandler = (sender, e) => +// { +// passwrod = etPassword.Text.Trim(); +// switch (etPassword.Text.Trim().Length) +// { +// case 0: +// btnTipIcon1.IsSelected = false; +// btnTipIcon2.IsSelected = false; +// btnTipIcon3.IsSelected = false; +// btnTipIcon4.IsSelected = false; +// break; +// case 1: +// btnTipIcon1.IsSelected = true; +// btnTipIcon2.IsSelected = false; +// btnTipIcon3.IsSelected = false; +// btnTipIcon4.IsSelected = false; +// btnTipError.Visible = false; +// break; +// case 2: +// btnTipIcon1.IsSelected = true; +// btnTipIcon2.IsSelected = true; +// btnTipIcon3.IsSelected = false; +// btnTipIcon4.IsSelected = false; +// break; +// case 3: +// btnTipIcon1.IsSelected = true; +// btnTipIcon2.IsSelected = true; +// btnTipIcon3.IsSelected = true; +// btnTipIcon4.IsSelected = false; +// break; +// case 4: +// btnTipIcon1.IsSelected = true; +// btnTipIcon2.IsSelected = true; +// btnTipIcon3.IsSelected = true; +// btnTipIcon4.IsSelected = true; +// Application.HideSoftInput(); +// if (string.IsNullOrEmpty(oldPasswrod)) +// { +// //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇 +// this.RemoveFromParent(); +// var page = new AppUnlockPasswordPage(passwrod, backAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(optionType); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// else +// { +// //2020-12-11 瀵嗙爜鏍¢獙 +// if (passwrod == oldPasswrod) +// { +// //瀵嗙爜楠岃瘉閫氳繃 +// PasswordInputPassed(optionType); +// } +// else +// { +// //瀵嗙爜楠岃瘉澶辫触 +// PasswordInputError(optionType); +// } +// } +// break; +// } +// }; - EventHandler<MouseEventArgs> eventHandler = (sender, e) => - { - etPassword.Foucs = true; - }; - bodyView.MouseUpEventHandler = eventHandler; - btnTipIcon1.MouseUpEventHandler = eventHandler; - btnTipIcon2.MouseUpEventHandler = eventHandler; - btnTipIcon3.MouseUpEventHandler = eventHandler; - btnTipIcon4.MouseUpEventHandler = eventHandler; +// EventHandler<MouseEventArgs> eventHandler = (sender, e) => +// { +// etPassword.Foucs = true; +// }; +// bodyView.MouseUpEventHandler = eventHandler; +// btnTipIcon1.MouseUpEventHandler = eventHandler; +// btnTipIcon2.MouseUpEventHandler = eventHandler; +// btnTipIcon3.MouseUpEventHandler = eventHandler; +// btnTipIcon4.MouseUpEventHandler = eventHandler; - etPassword.Foucs = true; +// etPassword.Foucs = true; - if (optionType == "7") - { - //浣跨敤璐︽埛瀵嗙爜鐧诲綍鎸夐挳 鎻愮ず鎸夐挳 - AddLoginTipButton(); - } - else if (optionType != "1") - { - //杈撳叆鐧诲綍瀵嗙爜楠岃瘉 鎻愮ず鎸夐挳 - AddInputPasswordTipButton(optionType); - } - } +// if (optionType == "7") +// { +// //浣跨敤璐︽埛瀵嗙爜鐧诲綍鎸夐挳 鎻愮ず鎸夐挳 +// AddLoginTipButton(); +// } +// else if (optionType != "1") +// { +// //杈撳叆鐧诲綍瀵嗙爜楠岃瘉 鎻愮ず鎸夐挳 +// AddInputPasswordTipButton(optionType); +// } +// } - /// <summary> - /// 瀵嗙爜杈撳叆閿欒鏄剧ず閿欒淇℃伅 - /// </summary> - /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> - void PasswordInputError(string optionType) - { - int errorTextID = 0; - if (optionType == "1") - { - //涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷达紝璇烽噸鏂拌緭鍏� - errorTextID = StringId.IncorrectRepeatPassword; - } - else - { - //楠岃瘉澶辫触锛屽瘑鐮侀敊璇�. - errorTextID = StringId.AuthenticationFailedPasswordError; - } +// /// <summary> +// /// 瀵嗙爜杈撳叆閿欒鏄剧ず閿欒淇℃伅 +// /// </summary> +// /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> +// void PasswordInputError(string optionType) +// { +// int errorTextID = 0; +// if (optionType == "1") +// { +// //涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷达紝璇烽噸鏂拌緭鍏� +// errorTextID = StringId.IncorrectRepeatPassword; +// } +// else +// { +// //楠岃瘉澶辫触锛屽瘑鐮侀敊璇�. +// errorTextID = StringId.AuthenticationFailedPasswordError; +// } - btnTipError.TextID = errorTextID; - etPassword.Text = ""; - btnTipError.Visible = true; - } +// btnTipError.TextID = errorTextID; +// etPassword.Text = ""; +// btnTipError.Visible = true; +// } - /// <summary> - /// 瀵嗙爜楠岃瘉閫氳繃鍚庣殑鎿嶄綔 - /// </summary> - /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> - void PasswordInputPassed(string optionType) - { - if (optionType == "1") - { - //璁剧疆瀵嗙爜 楠岃瘉閫氳繃 - this.RemoveFromParent(); - var page = new OperationResultDisPalyPage(); - page.Show(); +// /// <summary> +// /// 瀵嗙爜楠岃瘉閫氳繃鍚庣殑鎿嶄綔 +// /// </summary> +// /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> +// void PasswordInputPassed(string optionType) +// { +// if (optionType == "1") +// { +// //璁剧疆瀵嗙爜 楠岃瘉閫氳繃 +// this.RemoveFromParent(); +// var page = new OperationResultDisPalyPage(); +// page.Show(); - page.LoadPage(true, Language.StringByID(StringId.SetSuccessfully), Language.StringByID(StringId.SetSuccessfully), ""); - string tipMsg = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? Language.StringByID(StringId.TurnOnFingerprintUnlocking) : - Language.StringByID(StringId.TurnOnFaceIdUnlocking); +// page.LoadPage(true, Language.StringByID(StringId.SetSuccessfully), Language.StringByID(StringId.SetSuccessfully), ""); +// string tipMsg = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? Language.StringByID(StringId.TurnOnFingerprintUnlocking) : +// Language.StringByID(StringId.TurnOnFaceIdUnlocking); - if (TouchIDUtils.getTouchIDSupperType() != TouchIDUtils.TouchIDSupperType.None) - { - var unlockType = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? "3" : "4"; +// if (TouchIDUtils.getTouchIDSupperType() != TouchIDUtils.TouchIDSupperType.None) +// { +// var unlockType = TouchIDUtils.getTouchIDSupperType() == TouchIDUtils.TouchIDSupperType.TouchID ? "3" : "4"; - //濡傛灉涔嬪墠娌¤缃寚绾规垨鑰呴潰瀹笽D鎵嶆樉绀烘槸鍚﹀紑鍚� - if (!UserInfo.Current.appUnlockType.Contains(unlockType)) - { - Action<bool> action = (result) => - { - if (result) - { - if (!UserInfo.Current.appUnlockType.Contains(unlockType)) - { - UserInfo.Current.appUnlockType.Add(unlockType); - } - } - else - { - if (UserInfo.Current.appUnlockType.Contains(unlockType)) - { - UserInfo.Current.appUnlockType.Remove(unlockType); - } - } - backAction(); - UserInfo.Current.SaveUserInfo(); - }; +// //濡傛灉涔嬪墠娌¤缃寚绾规垨鑰呴潰瀹笽D鎵嶆樉绀烘槸鍚﹀紑鍚� +// if (!UserInfo.Current.appUnlockType.Contains(unlockType)) +// { +// Action<bool> action = (result) => +// { +// if (result) +// { +// if (!UserInfo.Current.appUnlockType.Contains(unlockType)) +// { +// UserInfo.Current.appUnlockType.Add(unlockType); +// } +// } +// else +// { +// if (UserInfo.Current.appUnlockType.Contains(unlockType)) +// { +// UserInfo.Current.appUnlockType.Remove(unlockType); +// } +// } +// backAction(); +// UserInfo.Current.SaveUserInfo(); +// }; - page.AdditionalOperations(tipMsg, action); - } - } - if (!UserInfo.Current.appUnlockType.Contains("1")) - { - UserInfo.Current.appUnlockType.Add("1"); - } - UserInfo.Current.appUnlockPasswrod = passwrod; - UserInfo.Current.SaveUserInfo(); - backAction(); - } - else if (optionType == "2") - { - //楠岃瘉瀵嗙爜閫氳繃 - //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇 - this.RemoveFromParent(); - var page = new AppUnlockPasswordPage("", backAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("1"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - else if (optionType == "3" || optionType == "4") - { - //3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆 閫氳繃 - if (optionType == "4") - { - backAction(); - this.RemoveFromParent(); - return; - } - if (UserInfo.Current.appUnlockType.Contains("1")) - { - UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>();//.Remove("1"); - UserInfo.Current.appUnlockPasswrod = ""; - UserInfo.Current.SaveUserInfo(); - this.RemoveFromParent(); - backAction(); - } - } - else if (optionType == "5") - { - //5:鎸囩汗ID寮�鍏� 閫氳繃 - if (UserInfo.Current.appUnlockType.Contains("3")) - { - UserInfo.Current.appUnlockType.Remove("3"); - } - else - { - UserInfo.Current.appUnlockType.Add("3"); - } - UserInfo.Current.SaveUserInfo(); - this.RemoveFromParent(); - backAction(); - } - else if (optionType == "6") - { - //6:闈㈠ID寮�鍏� 閫氳繃 - if (UserInfo.Current.appUnlockType.Contains("4")) - { - UserInfo.Current.appUnlockType.Remove("4"); - } - else - { - UserInfo.Current.appUnlockType.Add("4"); - } - UserInfo.Current.SaveUserInfo(); - this.RemoveFromParent(); - backAction(); - } - else if (optionType == "7") - { - //7:瑙i攣楠岃瘉 閫氳繃 - this.RemoveFromParent(); - backAction(); - } - } +// page.AdditionalOperations(tipMsg, action); +// } +// } +// if (!UserInfo.Current.appUnlockType.Contains("1")) +// { +// UserInfo.Current.appUnlockType.Add("1"); +// } +// UserInfo.Current.appUnlockPasswrod = passwrod; +// UserInfo.Current.SaveUserInfo(); +// backAction(); +// } +// else if (optionType == "2") +// { +// //楠岃瘉瀵嗙爜閫氳繃 +// //绉婚櫎褰撳墠鐣岄潰锛屾瘡娆¤繑鍥為兘杩斿洖鍒版渶涓婄骇 +// this.RemoveFromParent(); +// var page = new AppUnlockPasswordPage("", backAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("1"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// else if (optionType == "3" || optionType == "4") +// { +// //3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆 閫氳繃 +// if (optionType == "4") +// { +// backAction(); +// this.RemoveFromParent(); +// return; +// } +// if (UserInfo.Current.appUnlockType.Contains("1")) +// { +// UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>();//.Remove("1"); +// UserInfo.Current.appUnlockPasswrod = ""; +// UserInfo.Current.SaveUserInfo(); +// this.RemoveFromParent(); +// backAction(); +// } +// } +// else if (optionType == "5") +// { +// //5:鎸囩汗ID寮�鍏� 閫氳繃 +// if (UserInfo.Current.appUnlockType.Contains("3")) +// { +// UserInfo.Current.appUnlockType.Remove("3"); +// } +// else +// { +// UserInfo.Current.appUnlockType.Add("3"); +// } +// UserInfo.Current.SaveUserInfo(); +// this.RemoveFromParent(); +// backAction(); +// } +// else if (optionType == "6") +// { +// //6:闈㈠ID寮�鍏� 閫氳繃 +// if (UserInfo.Current.appUnlockType.Contains("4")) +// { +// UserInfo.Current.appUnlockType.Remove("4"); +// } +// else +// { +// UserInfo.Current.appUnlockType.Add("4"); +// } +// UserInfo.Current.SaveUserInfo(); +// this.RemoveFromParent(); +// backAction(); +// } +// else if (optionType == "7") +// { +// //7:瑙i攣楠岃瘉 閫氳繃 +// this.RemoveFromParent(); +// backAction(); +// } +// } - /// <summary> - /// 浣跨敤璐︽埛瀵嗙爜鐧诲綍鎸夐挳 鎻愮ず鎸夐挳 - /// </summary> - void AddLoginTipButton() - { - Button btnLoginAccountVerify = new Button() - { - Y = Application.GetRealHeight(517), - Height = Application.GetRealHeight(60), - TextAlignment = TextAlignment.Center, - TextSize = CSS_FontSize.TextFontSize, - TextColor = CSS_Color.MainColor, - TextID = StringId.LogWithAccountAndPassword, - }; - bodyView.AddChidren(btnLoginAccountVerify); +// /// <summary> +// /// 浣跨敤璐︽埛瀵嗙爜鐧诲綍鎸夐挳 鎻愮ず鎸夐挳 +// /// </summary> +// void AddLoginTipButton() +// { +// Button btnLoginAccountVerify = new Button() +// { +// Y = Application.GetRealHeight(517), +// Height = Application.GetRealHeight(60), +// TextAlignment = TextAlignment.Center, +// TextSize = CSS_FontSize.TextFontSize, +// TextColor = CSS_Color.MainColor, +// TextID = StringId.LogWithAccountAndPassword, +// }; +// bodyView.AddChidren(btnLoginAccountVerify); - btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => - { - //閫�鍑虹櫥褰� - HDLCommon.Current.Logout(); - }; - } +// btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => +// { +// //閫�鍑虹櫥褰� +// HDLCommon.Current.Logout(); +// }; +// } - /// <summary> - /// 杈撳叆鐧诲綍瀵嗙爜楠岃瘉 鎻愮ず鎸夐挳 - /// </summary> - void AddInputPasswordTipButton(string optionType) - { - Button btnLoginAccountVerify = new Button() - { - Y = Application.GetRealHeight(517), - Height = Application.GetRealHeight(60), - TextAlignment = TextAlignment.Center, - TextSize = CSS_FontSize.TextFontSize, - TextColor = CSS_Color.MainColor, - TextID = StringId.EnterLoginPasswordVerification, - }; - bodyView.AddChidren(btnLoginAccountVerify); +// /// <summary> +// /// 杈撳叆鐧诲綍瀵嗙爜楠岃瘉 鎻愮ず鎸夐挳 +// /// </summary> +// void AddInputPasswordTipButton(string optionType) +// { +// Button btnLoginAccountVerify = new Button() +// { +// Y = Application.GetRealHeight(517), +// Height = Application.GetRealHeight(60), +// TextAlignment = TextAlignment.Center, +// TextSize = CSS_FontSize.TextFontSize, +// TextColor = CSS_Color.MainColor, +// TextID = StringId.EnterLoginPasswordVerification, +// }; +// bodyView.AddChidren(btnLoginAccountVerify); - btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => - { - //杈撳叆鐧诲綍瀵嗙爜楠岃瘉 - Action<string> action = (pw) => - { - AuthenticationByLoginPassword(pw, optionType); - //var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); - //if (resultObj.Code == StateCode.SUCCESS) - //{ - // PasswordInputPassed(optionType); - //} - //else - //{ - // Application.RunOnMainThread(() => - // { - // Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); - // }); +// btnLoginAccountVerify.MouseUpEventHandler = (sender, e) => +// { +// //杈撳叆鐧诲綍瀵嗙爜楠岃瘉 +// Action<string> action = (pw) => +// { +// AuthenticationByLoginPassword(pw, optionType); +// //var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); +// //if (resultObj.Code == StateCode.SUCCESS) +// //{ +// // PasswordInputPassed(optionType); +// //} +// //else +// //{ +// // Application.RunOnMainThread(() => +// // { +// // Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); +// // }); - //} +// //} - }; - new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action, StringId.PlsEntryPassword, 0, new System.Collections.Generic.List<string>(), true); - }; - } +// }; +// new PublicAssmebly().LoadDialog_EditParater(StringId.EnterLoginPasswordVerification, "", action, StringId.PlsEntryPassword, 0, new System.Collections.Generic.List<string>(), true); +// }; +// } - /// <summary> - /// 鐧诲綍瀵嗙爜楠岃瘉 - /// </summary> - /// <param name="pw"></param> - /// <param name="optionType"></param> - void AuthenticationByLoginPassword(string pw, string optionType) - { - var waitPage = new Loading(); - bodyView.AddChidren(waitPage); - waitPage.Start(Language.StringByID(StringId.PleaseWait)); +// /// <summary> +// /// 鐧诲綍瀵嗙爜楠岃瘉 +// /// </summary> +// /// <param name="pw"></param> +// /// <param name="optionType"></param> +// void AuthenticationByLoginPassword(string pw, string optionType) +// { +// var waitPage = new Loading(); +// bodyView.AddChidren(waitPage); +// waitPage.Start(Language.StringByID(StringId.PleaseWait)); - new System.Threading.Thread(() => - { - try - { - var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); - Application.RunOnMainThread(() => - { - if (resultObj.Code == StateCode.SUCCESS) - { - PasswordInputPassed(optionType); - } - else - { - Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); - } - }); - } - catch { } - finally - { - Application.RunOnMainThread(() => - { - if (waitPage != null) - { - waitPage.RemoveFromParent(); - waitPage = null; - } - }); - } - }) - { IsBackground = true }.Start(); - } - } -} +// new System.Threading.Thread(() => +// { +// try +// { +// var resultObj = new HttpServerRequest().LoginByPassword(UserInfo.Current.AccountString, pw); +// Application.RunOnMainThread(() => +// { +// if (resultObj.Code == StateCode.SUCCESS) +// { +// PasswordInputPassed(optionType); +// } +// else +// { +// Utlis.ShowTip(Language.StringByID(StringId.AuthenticationFailedPasswordError)); +// } +// }); +// } +// catch { } +// finally +// { +// Application.RunOnMainThread(() => +// { +// if (waitPage != null) +// { +// waitPage.RemoveFromParent(); +// waitPage = null; +// } +// }); +// } +// }) +// { IsBackground = true }.Start(); +// } +// } +//} diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs index 6eb3d6b..9fe4c9a 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs @@ -1,810 +1,810 @@ -锘縰sing System; -using HDL_ON.UI.CSS; -using Shared; +锘�//using System; +//using HDL_ON.UI.CSS; +//using Shared; -namespace HDL_ON.UI -{ - public partial class AppUnlockSettingsPage : FrameLayout - { - #region 鎺т欢鍒楄〃 - FrameLayout bodyView; +//namespace HDL_ON.UI +//{ +// public partial class AppUnlockSettingsPage : FrameLayout +// { +// #region 鎺т欢鍒楄〃 +// FrameLayout bodyView; - /// <summary> - /// 涓婇儴鍒嗘樉绀哄尯鍩� - /// </summary> - FrameLayout topContentView; - /// <summary> - /// 瑙i攣椤甸潰閫夋嫨鍒楄〃view - /// </summary> - HorizontalScrolViewLayout optionView; +// /// <summary> +// /// 涓婇儴鍒嗘樉绀哄尯鍩� +// /// </summary> +// FrameLayout topContentView; +// /// <summary> +// /// 瑙i攣椤甸潰閫夋嫨鍒楄〃view +// /// </summary> +// HorizontalScrolViewLayout optionView; - /// <summary> - /// 鏃犱繚鎶ら�夐」鎻愮ず - /// </summary> - Button btnUnprotectedSelectionTip; - /// <summary> - /// 鏃犱繚鎶ら�夐」閫変腑鍥炬爣 - /// </summary> - Button btnUnprotectedSelectionIcon; - /// <summary> - /// 鏃犱繚鎶ら�夐」鑳屾櫙 - /// </summary> - Button btnUnprotectedBg; +// /// <summary> +// /// 鏃犱繚鎶ら�夐」鎻愮ず +// /// </summary> +// Button btnUnprotectedSelectionTip; +// /// <summary> +// /// 鏃犱繚鎶ら�夐」閫変腑鍥炬爣 +// /// </summary> +// Button btnUnprotectedSelectionIcon; +// /// <summary> +// /// 鏃犱繚鎶ら�夐」鑳屾櫙 +// /// </summary> +// Button btnUnprotectedBg; - /// <summary> - /// 鍚姩鏃堕�夐」鎻愮ず - /// </summary> - Button btnStartupSelectionTip; - /// <summary> - /// 鍚姩鏃堕�夐」閫変腑鍥炬爣 - /// </summary> - Button btnStartupSelectionIcon; - /// <summary> - /// 鍚姩鏃堕�夐」鑳屾櫙 - /// </summary> - Button btnStartupBg; +// /// <summary> +// /// 鍚姩鏃堕�夐」鎻愮ず +// /// </summary> +// Button btnStartupSelectionTip; +// /// <summary> +// /// 鍚姩鏃堕�夐」閫変腑鍥炬爣 +// /// </summary> +// Button btnStartupSelectionIcon; +// /// <summary> +// /// 鍚姩鏃堕�夐」鑳屾櫙 +// /// </summary> +// Button btnStartupBg; - #region F3闃舵 - ///// <summary> - ///// 璁剧疆瀹夐槻閫夐」鎻愮ず - ///// </summary> - //Button btnSecuritySelectionTip; - ///// <summary> - ///// 璁剧疆瀹夐槻閫夐」閫変腑鍥炬爣 - ///// </summary> - //Button btnSecuritySelectionIcon; - ///// <summary> - ///// 璁剧疆瀹夐槻閫夐」鑳屾櫙 - ///// </summary> - //Button btnSecurityBg; +// #region F3闃舵 +// ///// <summary> +// ///// 璁剧疆瀹夐槻閫夐」鎻愮ず +// ///// </summary> +// //Button btnSecuritySelectionTip; +// ///// <summary> +// ///// 璁剧疆瀹夐槻閫夐」閫変腑鍥炬爣 +// ///// </summary> +// //Button btnSecuritySelectionIcon; +// ///// <summary> +// ///// 璁剧疆瀹夐槻閫夐」鑳屾櫙 +// ///// </summary> +// //Button btnSecurityBg; - /// <summary> - /// 璁剧疆闂ㄩ攣閫夐」鎻愮ず - /// </summary> - Button btnDoorlockSelectionTip; - /// <summary> - /// 璁剧疆闂ㄩ攣閫夐」閫変腑鍥炬爣 - /// </summary> - Button btnDoorlockSelectionIcon; - /// <summary> - /// 璁剧疆闂ㄩ攣閫夐」鑳屾櫙 - /// </summary> - Button btnDoorlockBg; - #endregion +// /// <summary> +// /// 璁剧疆闂ㄩ攣閫夐」鎻愮ず +// /// </summary> +// Button btnDoorlockSelectionTip; +// /// <summary> +// /// 璁剧疆闂ㄩ攣閫夐」閫変腑鍥炬爣 +// /// </summary> +// Button btnDoorlockSelectionIcon; +// /// <summary> +// /// 璁剧疆闂ㄩ攣閫夐」鑳屾櫙 +// /// </summary> +// Button btnDoorlockBg; +// #endregion - /// <summary> - /// 瀵嗙爜浣跨敤閫夋嫨鐨勮缁嗗唴瀹规彁绀� - /// </summary> - Button btnTipMsg; +// /// <summary> +// /// 瀵嗙爜浣跨敤閫夋嫨鐨勮缁嗗唴瀹规彁绀� +// /// </summary> +// Button btnTipMsg; - /// <summary> - /// 瑙i攣鏂瑰紡鍖哄煙view - /// </summary> - VerticalScrolViewLayout unlockOptionView; +// /// <summary> +// /// 瑙i攣鏂瑰紡鍖哄煙view +// /// </summary> +// VerticalScrolViewLayout unlockOptionView; - /// <summary> - /// 瀵嗙爜璁剧疆鏂囨湰 - /// 浜嬩欢璺宠浆鎸夐挳 - /// </summary> - Button btnPasswordUnlockTitle; - /// <summary> - /// 淇敼瀵嗙爜鏂囨湰 - /// 浜嬩欢璺宠浆鎸夐挳 - /// </summary> - Button btnResetPasswordTitle; +// /// <summary> +// /// 瀵嗙爜璁剧疆鏂囨湰 +// /// 浜嬩欢璺宠浆鎸夐挳 +// /// </summary> +// Button btnPasswordUnlockTitle; +// /// <summary> +// /// 淇敼瀵嗙爜鏂囨湰 +// /// 浜嬩欢璺宠浆鎸夐挳 +// /// </summary> +// Button btnResetPasswordTitle; - /// <summary> - /// 鎵嬪娍璁剧疆鏂囨湰 - /// 浜嬩欢璺宠浆鎸夐挳 - /// </summary> - Button btnGestureUnlockTitle; - /// <summary> - /// 淇敼鎵嬪娍瀵嗙爜 - /// 浜嬩欢璺宠浆鎸夐挳 - /// </summary> - Button btnResetGestureTitle; +// /// <summary> +// /// 鎵嬪娍璁剧疆鏂囨湰 +// /// 浜嬩欢璺宠浆鎸夐挳 +// /// </summary> +// Button btnGestureUnlockTitle; +// /// <summary> +// /// 淇敼鎵嬪娍瀵嗙爜 +// /// 浜嬩欢璺宠浆鎸夐挳 +// /// </summary> +// Button btnResetGestureTitle; - /// <summary> - /// 鎸囩汗璁剧疆鏂囨湰 - /// 浜嬩欢璺宠浆鎸夐挳 - /// </summary> - Button btnFingerprintUnlockSwtichIcon; - /// <summary> - /// 闈㈠ID璁剧疆鏂囨湰 - /// 浜嬩欢璺宠浆鎸夐挳 - /// </summary> - Button btnFaceIdUnlockSwtichIcon; +// /// <summary> +// /// 鎸囩汗璁剧疆鏂囨湰 +// /// 浜嬩欢璺宠浆鎸夐挳 +// /// </summary> +// Button btnFingerprintUnlockSwtichIcon; +// /// <summary> +// /// 闈㈠ID璁剧疆鏂囨湰 +// /// 浜嬩欢璺宠浆鎸夐挳 +// /// </summary> +// Button btnFaceIdUnlockSwtichIcon; - /// <summary> - /// 鎸囩汗瑙i攣鏂瑰紡Row - /// </summary> - FrameLayout fingerprintUnlockDiv; - /// <summary> - /// 闈㈠瑙i攣鏂瑰紡Row - /// </summary> - FrameLayout faceIdUnlockDiv; - #endregion +// /// <summary> +// /// 鎸囩汗瑙i攣鏂瑰紡Row +// /// </summary> +// FrameLayout fingerprintUnlockDiv; +// /// <summary> +// /// 闈㈠瑙i攣鏂瑰紡Row +// /// </summary> +// FrameLayout faceIdUnlockDiv; +// #endregion - /// <summary> - /// 鏄惁鏀寔鎸囩汗瑙i攣 - /// </summary> - bool sTouchID = false; - /// <summary> - /// 鏄惁鏀寔闈㈠瑙i攣 - /// </summary> - bool sFaceID = false; +// /// <summary> +// /// 鏄惁鏀寔鎸囩汗瑙i攣 +// /// </summary> +// bool sTouchID = false; +// /// <summary> +// /// 鏄惁鏀寔闈㈠瑙i攣 +// /// </summary> +// bool sFaceID = false; - public AppUnlockSettingsPage() - { - bodyView = this; - } +// public AppUnlockSettingsPage() +// { +// bodyView = this; +// } - public void LoadPage() - { - bodyView.BackgroundColor = CSS_Color.BackgroundColor; - //濡傛灉鐢ㄦ埛閰嶇疆浜嗛渶瑕佽В閿佺殑鐣岄潰浣嗘槸娌℃湁璁剧疆瀵嗙爜锛屽垯鍦ㄨ繑鍥炴椂娓呯┖闇�瑕佽В閿佺殑鐣岄潰 - Action action = () => { - if(UserInfo.Current.appUnlockPage.Count > 0&& UserInfo.Current.appUnlockPasswrod == "") - { - UserInfo.Current.appUnlockPage = new System.Collections.Generic.List<string>(); - UserInfo.Current.SaveUserInfo(); - } - }; - new TopViewDiv(bodyView, Language.StringByID(StringId.InterpretationSettings)).LoadTopView(action); +// public void LoadPage() +// { +// bodyView.BackgroundColor = CSS_Color.BackgroundColor; +// //濡傛灉鐢ㄦ埛閰嶇疆浜嗛渶瑕佽В閿佺殑鐣岄潰浣嗘槸娌℃湁璁剧疆瀵嗙爜锛屽垯鍦ㄨ繑鍥炴椂娓呯┖闇�瑕佽В閿佺殑鐣岄潰 +// Action action = () => { +// if(UserInfo.Current.appUnlockPage.Count > 0&& UserInfo.Current.appUnlockPasswrod == "") +// { +// UserInfo.Current.appUnlockPage = new System.Collections.Generic.List<string>(); +// UserInfo.Current.SaveUserInfo(); +// } +// }; +// new TopViewDiv(bodyView, Language.StringByID(StringId.InterpretationSettings)).LoadTopView(action); - topContentView = new FrameLayout() - { - Y = Application.GetRealHeight(64), - Height = Application.GetRealWidth(332), - BackgroundColor = CSS_Color.MainBackgroundColor - }; - bodyView.AddChidren(topContentView); +// topContentView = new FrameLayout() +// { +// Y = Application.GetRealHeight(64), +// Height = Application.GetRealWidth(332), +// BackgroundColor = CSS_Color.MainBackgroundColor +// }; +// bodyView.AddChidren(topContentView); - Button btnTip1 = new Button() - { - Y = Application.GetRealHeight(8), - Height = Application.GetRealHeight(30), - TextAlignment = TextAlignment.Center, - IsBold = true, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.SubheadingFontSize, - TextID = StringId.PleaseSelectThePageToBeUnlocked, - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - topContentView.AddChidren(btnTip1); +// Button btnTip1 = new Button() +// { +// Y = Application.GetRealHeight(8), +// Height = Application.GetRealHeight(30), +// TextAlignment = TextAlignment.Center, +// IsBold = true, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.SubheadingFontSize, +// TextID = StringId.PleaseSelectThePageToBeUnlocked, +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }; +// topContentView.AddChidren(btnTip1); - Button btnTip2 = new Button() - { - Y = btnTip1.Bottom, - Height = Application.GetRealHeight(25), - TextAlignment = TextAlignment.Center, - TextColor = CSS_Color.PromptingColor1, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - BackgroundColor = CSS_Color.MainBackgroundColor, - TextID = StringId.MultipleChoicesOfPagesYouNeedToProtect, - IsMoreLines = true, - }; - topContentView.AddChidren(btnTip2); - if(Language.CurrentLanguage == "Engligh") - { - btnTip2.Height = Application.GetRealHeight(30); - } +// Button btnTip2 = new Button() +// { +// Y = btnTip1.Bottom, +// Height = Application.GetRealHeight(25), +// TextAlignment = TextAlignment.Center, +// TextColor = CSS_Color.PromptingColor1, +// TextSize = CSS_FontSize.PromptFontSize_FirstLevel, +// BackgroundColor = CSS_Color.MainBackgroundColor, +// TextID = StringId.MultipleChoicesOfPagesYouNeedToProtect, +// IsMoreLines = true, +// }; +// topContentView.AddChidren(btnTip2); +// if(Language.CurrentLanguage == "Engligh") +// { +// btnTip2.Height = Application.GetRealHeight(30); +// } - optionView = new HorizontalScrolViewLayout() - { - Y = Application.GetRealWidth(143 - 64), - Height = Application.GetRealWidth(209), - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - topContentView.AddChidren(optionView); +// optionView = new HorizontalScrolViewLayout() +// { +// Y = Application.GetRealWidth(143 - 64), +// Height = Application.GetRealWidth(209), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// }; +// topContentView.AddChidren(optionView); - LoadView_OptionView(); +// LoadView_OptionView(); - btnTipMsg = new Button() - { - Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealWidth(288), - Width = Application.GetRealWidth(311), - Height = Application.GetRealWidth(28), - TextAlignment = TextAlignment.Center, - TextColor = CSS_Color.FirstLevelTitleColor, - SelectedTextColor = CSS_Color.FirstLevelTitleColor, - BorderColor = CSS_Color.MainColor, - BorderWidth = 1, - Radius = 1, - TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, - TextID = StringId.UnprotectedTipMsg, - }; - topContentView.AddChidren(btnTipMsg); - if (Language.CurrentLanguage == "Engligh") - { - btnTip2.Height = Application.GetRealHeight(40); - topContentView.Height = Application.GetRealHeight(360); - } +// btnTipMsg = new Button() +// { +// Gravity = Gravity.CenterHorizontal, +// Y = Application.GetRealWidth(288), +// Width = Application.GetRealWidth(311), +// Height = Application.GetRealWidth(28), +// TextAlignment = TextAlignment.Center, +// TextColor = CSS_Color.FirstLevelTitleColor, +// SelectedTextColor = CSS_Color.FirstLevelTitleColor, +// BorderColor = CSS_Color.MainColor, +// BorderWidth = 1, +// Radius = 1, +// TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, +// TextID = StringId.UnprotectedTipMsg, +// }; +// topContentView.AddChidren(btnTipMsg); +// if (Language.CurrentLanguage == "Engligh") +// { +// btnTip2.Height = Application.GetRealHeight(40); +// topContentView.Height = Application.GetRealHeight(360); +// } - LoadEventList(); +// LoadEventList(); - LoadView_UnlockView(); +// LoadView_UnlockView(); - } - /// <summary> - /// 鍔犺浇閫夐」鍗� - /// </summary> - void LoadView_OptionView() - { - #region Unprotected - optionView.AddChidren(new Button() { Width = Application.GetRealWidth(24) }); +// } +// /// <summary> +// /// 鍔犺浇閫夐」鍗� +// /// </summary> +// void LoadView_OptionView() +// { +// #region Unprotected +// optionView.AddChidren(new Button() { Width = Application.GetRealWidth(24) }); - FrameLayout unprotectedDiv = new FrameLayout() - { - Width = Application.GetRealWidth(94), - }; - optionView.AddChidren(unprotectedDiv); +// FrameLayout unprotectedDiv = new FrameLayout() +// { +// Width = Application.GetRealWidth(94), +// }; +// optionView.AddChidren(unprotectedDiv); - btnUnprotectedBg = new Button() - { - Height = Application.GetRealWidth(174), - UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/1.png", - SelectedImagePath = "PersonalCenter/AppUnlockSetting/1On.png" - }; - unprotectedDiv.AddChidren(btnUnprotectedBg); +// btnUnprotectedBg = new Button() +// { +// Height = Application.GetRealWidth(174), +// UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/1.png", +// SelectedImagePath = "PersonalCenter/AppUnlockSetting/1On.png" +// }; +// unprotectedDiv.AddChidren(btnUnprotectedBg); - btnUnprotectedSelectionIcon = new Button() - { - X = Application.GetRealWidth(5), - Y = Application.GetRealWidth(174), - Width = Application.GetRealWidth(30), - Height = Application.GetRealWidth(30), - UnSelectedImagePath = "Public/ChooseIcon.png", - SelectedImagePath = "Public/ChooseOnIcon.png", - }; - unprotectedDiv.AddChidren(btnUnprotectedSelectionIcon); +// btnUnprotectedSelectionIcon = new Button() +// { +// X = Application.GetRealWidth(5), +// Y = Application.GetRealWidth(174), +// Width = Application.GetRealWidth(30), +// Height = Application.GetRealWidth(30), +// UnSelectedImagePath = "Public/ChooseIcon.png", +// SelectedImagePath = "Public/ChooseOnIcon.png", +// }; +// unprotectedDiv.AddChidren(btnUnprotectedSelectionIcon); - btnUnprotectedSelectionTip = new Button() - { - X = Application.GetRealWidth(30), - Y = Application.GetRealWidth(174), - Width = Application.GetRealWidth(74), - Height = Application.GetRealWidth(30), - TextID = StringId.Unprotected, - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, - SelectedTextColor = CSS_Color.MainColor, - }; - unprotectedDiv.AddChidren(btnUnprotectedSelectionTip); - #endregion +// btnUnprotectedSelectionTip = new Button() +// { +// X = Application.GetRealWidth(30), +// Y = Application.GetRealWidth(174), +// Width = Application.GetRealWidth(74), +// Height = Application.GetRealWidth(30), +// TextID = StringId.Unprotected, +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, +// SelectedTextColor = CSS_Color.MainColor, +// }; +// unprotectedDiv.AddChidren(btnUnprotectedSelectionTip); +// #endregion - #region Startup - optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); +// #region Startup +// optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); - FrameLayout startupDiv = new FrameLayout() - { - Width = Application.GetRealWidth(94), - }; - optionView.AddChidren(startupDiv); +// FrameLayout startupDiv = new FrameLayout() +// { +// Width = Application.GetRealWidth(94), +// }; +// optionView.AddChidren(startupDiv); - btnStartupBg = new Button() - { - Height = Application.GetRealWidth(174), - UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/2.png", - SelectedImagePath = "PersonalCenter/AppUnlockSetting/2On.png" - }; - startupDiv.AddChidren(btnStartupBg); +// btnStartupBg = new Button() +// { +// Height = Application.GetRealWidth(174), +// UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/2.png", +// SelectedImagePath = "PersonalCenter/AppUnlockSetting/2On.png" +// }; +// startupDiv.AddChidren(btnStartupBg); - btnStartupSelectionIcon = new Button() - { - X = Application.GetRealWidth(5), - Y = Application.GetRealWidth(174), - Width = Application.GetRealWidth(30), - Height = Application.GetRealWidth(30), - UnSelectedImagePath = "Public/ChooseIcon.png", - SelectedImagePath = "Public/ChooseOnIcon.png", - }; - startupDiv.AddChidren(btnStartupSelectionIcon); +// btnStartupSelectionIcon = new Button() +// { +// X = Application.GetRealWidth(5), +// Y = Application.GetRealWidth(174), +// Width = Application.GetRealWidth(30), +// Height = Application.GetRealWidth(30), +// UnSelectedImagePath = "Public/ChooseIcon.png", +// SelectedImagePath = "Public/ChooseOnIcon.png", +// }; +// startupDiv.AddChidren(btnStartupSelectionIcon); - btnStartupSelectionTip = new Button() - { - X = Application.GetRealWidth(30), - Y = Application.GetRealWidth(174), - Width = Application.GetRealWidth(74), - Height = Application.GetRealWidth(30), - TextID = StringId.AtStartup, - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - SelectedTextColor = CSS_Color.MainColor, - TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel - }; - startupDiv.AddChidren(btnStartupSelectionTip); - #endregion +// btnStartupSelectionTip = new Button() +// { +// X = Application.GetRealWidth(30), +// Y = Application.GetRealWidth(174), +// Width = Application.GetRealWidth(74), +// Height = Application.GetRealWidth(30), +// TextID = StringId.AtStartup, +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// SelectedTextColor = CSS_Color.MainColor, +// TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel +// }; +// startupDiv.AddChidren(btnStartupSelectionTip); +// #endregion - #region F3闃舵 - #region Security - //optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); +// #region F3闃舵 +// #region Security +// //optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); - //FrameLayout securityDiv = new FrameLayout() - //{ - // Width = Application.GetRealWidth(94), - //}; - //optionView.AddChidren(securityDiv); +// //FrameLayout securityDiv = new FrameLayout() +// //{ +// // Width = Application.GetRealWidth(94), +// //}; +// //optionView.AddChidren(securityDiv); - //btnSecurityBg = new Button() - //{ - // Height = Application.GetRealWidth(174), - // UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/3.png", - // SelectedImagePath = "PersonalCenter/AppUnlockSetting/3On.png" - //}; - //securityDiv.AddChidren(btnSecurityBg); +// //btnSecurityBg = new Button() +// //{ +// // Height = Application.GetRealWidth(174), +// // UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/3.png", +// // SelectedImagePath = "PersonalCenter/AppUnlockSetting/3On.png" +// //}; +// //securityDiv.AddChidren(btnSecurityBg); - //btnSecuritySelectionIcon = new Button() - //{ - // X = Application.GetRealWidth(5), - // Y = Application.GetRealWidth(174), - // Width = Application.GetRealWidth(30), - // Height = Application.GetRealWidth(30), - // UnSelectedImagePath = "Public/ChooseIcon.png", - // SelectedImagePath = "Public/ChooseOnIcon.png", - //}; - //securityDiv.AddChidren(btnSecuritySelectionIcon); +// //btnSecuritySelectionIcon = new Button() +// //{ +// // X = Application.GetRealWidth(5), +// // Y = Application.GetRealWidth(174), +// // Width = Application.GetRealWidth(30), +// // Height = Application.GetRealWidth(30), +// // UnSelectedImagePath = "Public/ChooseIcon.png", +// // SelectedImagePath = "Public/ChooseOnIcon.png", +// //}; +// //securityDiv.AddChidren(btnSecuritySelectionIcon); - //btnSecuritySelectionTip = new Button() - //{ - // X = Application.GetRealWidth(30), - // Y = Application.GetRealWidth(174), - // Width = Application.GetRealWidth(74), - // Height = Application.GetRealWidth(30), - // TextID = StringId.DefenseAndUndefense, - // TextAlignment = TextAlignment.CenterLeft, - // TextColor = CSS_Color.FirstLevelTitleColor, - // SelectedTextColor = CSS_Color.MainColor, - // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel - //}; - //securityDiv.AddChidren(btnSecuritySelectionTip); - #endregion +// //btnSecuritySelectionTip = new Button() +// //{ +// // X = Application.GetRealWidth(30), +// // Y = Application.GetRealWidth(174), +// // Width = Application.GetRealWidth(74), +// // Height = Application.GetRealWidth(30), +// // TextID = StringId.DefenseAndUndefense, +// // TextAlignment = TextAlignment.CenterLeft, +// // TextColor = CSS_Color.FirstLevelTitleColor, +// // SelectedTextColor = CSS_Color.MainColor, +// // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel +// //}; +// //securityDiv.AddChidren(btnSecuritySelectionTip); +// #endregion - #region Doorlock - optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); +// #region Doorlock +// optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); - FrameLayout doorlockDiv = new FrameLayout() - { - Width = Application.GetRealWidth(94), - }; - optionView.AddChidren(doorlockDiv); +// FrameLayout doorlockDiv = new FrameLayout() +// { +// Width = Application.GetRealWidth(94), +// }; +// optionView.AddChidren(doorlockDiv); - btnDoorlockBg = new Button() - { - Height = Application.GetRealWidth(174), - UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/4.png", - SelectedImagePath = "PersonalCenter/AppUnlockSetting/4On.png" - }; - doorlockDiv.AddChidren(btnDoorlockBg); +// btnDoorlockBg = new Button() +// { +// Height = Application.GetRealWidth(174), +// UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/4.png", +// SelectedImagePath = "PersonalCenter/AppUnlockSetting/4On.png" +// }; +// doorlockDiv.AddChidren(btnDoorlockBg); - btnDoorlockSelectionIcon = new Button() - { - X = Application.GetRealWidth(5), - Y = Application.GetRealWidth(174), - Width = Application.GetRealWidth(30), - Height = Application.GetRealWidth(30), - UnSelectedImagePath = "Public/ChooseIcon.png", - SelectedImagePath = "Public/ChooseOnIcon.png", - }; - doorlockDiv.AddChidren(btnDoorlockSelectionIcon); +// btnDoorlockSelectionIcon = new Button() +// { +// X = Application.GetRealWidth(5), +// Y = Application.GetRealWidth(174), +// Width = Application.GetRealWidth(30), +// Height = Application.GetRealWidth(30), +// UnSelectedImagePath = "Public/ChooseIcon.png", +// SelectedImagePath = "Public/ChooseOnIcon.png", +// }; +// doorlockDiv.AddChidren(btnDoorlockSelectionIcon); - btnDoorlockSelectionTip = new Button() - { - X = Application.GetRealWidth(30), - Y = Application.GetRealWidth(174), - Width = Application.GetRealWidth(74), - Height = Application.GetRealWidth(30), - TextID = StringId.RemoteUnlocking, - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - SelectedTextColor = CSS_Color.MainColor, - TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel - }; - doorlockDiv.AddChidren(btnDoorlockSelectionTip); - #endregion - #endregion +// btnDoorlockSelectionTip = new Button() +// { +// X = Application.GetRealWidth(30), +// Y = Application.GetRealWidth(174), +// Width = Application.GetRealWidth(74), +// Height = Application.GetRealWidth(30), +// TextID = StringId.RemoteUnlocking, +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// SelectedTextColor = CSS_Color.MainColor, +// TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel +// }; +// doorlockDiv.AddChidren(btnDoorlockSelectionTip); +// #endregion +// #endregion - optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); - } +// optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); +// } - /// <summary> - /// 鍔犺浇瑙i攣鏂瑰紡鍖哄煙 - /// </summary> - void LoadView_UnlockView() - { - if(unlockOptionView!= null) - { - unlockOptionView.RemoveAll(); - } - unlockOptionView = new VerticalScrolViewLayout() - { - Y = topContentView.Bottom + Application.GetRealHeight(8), - Height = Application.GetRealHeight(260), - BackgroundColor = CSS_Color.MainBackgroundColor, - ScrollEnabled = false, - Visible = UserInfo.Current.appUnlockPage.Count > 0 - }; - bodyView.AddChidren(unlockOptionView); +// /// <summary> +// /// 鍔犺浇瑙i攣鏂瑰紡鍖哄煙 +// /// </summary> +// void LoadView_UnlockView() +// { +// if(unlockOptionView!= null) +// { +// unlockOptionView.RemoveAll(); +// } +// unlockOptionView = new VerticalScrolViewLayout() +// { +// Y = topContentView.Bottom + Application.GetRealHeight(8), +// Height = Application.GetRealHeight(260), +// BackgroundColor = CSS_Color.MainBackgroundColor, +// ScrollEnabled = false, +// Visible = UserInfo.Current.appUnlockPage.Count > 0 +// }; +// bodyView.AddChidren(unlockOptionView); - #region 鏍囬鏍� - var unlockTitleDiv = new FrameLayout() - { - Height = Application.GetRealHeight(59), - }; - unlockOptionView.AddChidren(unlockTitleDiv); +// #region 鏍囬鏍� +// var unlockTitleDiv = new FrameLayout() +// { +// Height = Application.GetRealHeight(59), +// }; +// unlockOptionView.AddChidren(unlockTitleDiv); - var btnUnlockTitle = new Button() - { - X = Application.GetRealWidth(16), - Y = Application.GetRealWidth(6), - Width = Application.GetRealWidth(263), - Height = Application.GetRealWidth(26), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - IsBold = true, - TextSize = CSS_FontSize.SubheadingFontSize, - TextID = StringId.SetUnlockingMethod, - }; - unlockTitleDiv.AddChidren(btnUnlockTitle); +// var btnUnlockTitle = new Button() +// { +// X = Application.GetRealWidth(16), +// Y = Application.GetRealWidth(6), +// Width = Application.GetRealWidth(263), +// Height = Application.GetRealWidth(26), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// IsBold = true, +// TextSize = CSS_FontSize.SubheadingFontSize, +// TextID = StringId.SetUnlockingMethod, +// }; +// unlockTitleDiv.AddChidren(btnUnlockTitle); - var btnUnlockTitleTip = new Button() - { - X = Application.GetRealWidth(16), - Y = btnUnlockTitle.Bottom, - Width = Application.GetRealWidth(263), - Height = Application.GetRealWidth(21), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.PromptingColor1, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - TextID = StringId.ValidForNativeOnly, - }; - unlockTitleDiv.AddChidren(btnUnlockTitleTip); +// var btnUnlockTitleTip = new Button() +// { +// X = Application.GetRealWidth(16), +// Y = btnUnlockTitle.Bottom, +// Width = Application.GetRealWidth(263), +// Height = Application.GetRealWidth(21), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.PromptingColor1, +// TextSize = CSS_FontSize.PromptFontSize_FirstLevel, +// TextID = StringId.ValidForNativeOnly, +// }; +// unlockTitleDiv.AddChidren(btnUnlockTitleTip); - unlockOptionView.AddChidren(new Button() - { - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(359), - Height = 1, - BackgroundColor = CSS_Color.BackgroundColor, - }); - #endregion +// unlockOptionView.AddChidren(new Button() +// { +// X = Application.GetRealWidth(16), +// Width = Application.GetRealWidth(359), +// Height = 1, +// BackgroundColor = CSS_Color.BackgroundColor, +// }); +// #endregion - #region 瀵嗙爜瑙i攣 - var passwordUnlockDiv = new FrameLayout() - { - Height = Application.GetRealHeight(50), - }; - if ( !UserInfo.Current.appUnlockType.Contains("2")) - { - unlockOptionView.AddChidren(passwordUnlockDiv); - } +// #region 瀵嗙爜瑙i攣 +// var passwordUnlockDiv = new FrameLayout() +// { +// Height = Application.GetRealHeight(50), +// }; +// if ( !UserInfo.Current.appUnlockType.Contains("2")) +// { +// unlockOptionView.AddChidren(passwordUnlockDiv); +// } - var btnPasswordUnlockIcon = new Button() - { - X = Application.GetRealWidth(16), - Gravity = Gravity.CenterVertical, - Width = Application.GetRealWidth(32), - Height = Application.GetRealWidth(32), - UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/PasswordIcon.png", - }; - passwordUnlockDiv.AddChidren(btnPasswordUnlockIcon); +// var btnPasswordUnlockIcon = new Button() +// { +// X = Application.GetRealWidth(16), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetRealWidth(32), +// Height = Application.GetRealWidth(32), +// UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/PasswordIcon.png", +// }; +// passwordUnlockDiv.AddChidren(btnPasswordUnlockIcon); - //var btnPasswordUnlockRightIcon = new Button() - //{ - // X = Application.GetRealWidth(339), - // Gravity = Gravity.CenterVertical, - // Width = Application.GetMinRealAverage(16), - // Height = Application.GetMinRealAverage(16), - // UnSelectedImagePath = "Public/Right.png", - //}; - //passwordUnlockDiv.AddChidren(btnPasswordUnlockRightIcon); +// //var btnPasswordUnlockRightIcon = new Button() +// //{ +// // X = Application.GetRealWidth(339), +// // Gravity = Gravity.CenterVertical, +// // Width = Application.GetMinRealAverage(16), +// // Height = Application.GetMinRealAverage(16), +// // UnSelectedImagePath = "Public/Right.png", +// //}; +// //passwordUnlockDiv.AddChidren(btnPasswordUnlockRightIcon); - var btnPasswordUnlockkSwtichIcon = new Button() - { - X = Application.GetRealWidth(322), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(38), - Height = Application.GetMinRealAverage(38), - UnSelectedImagePath = "Public/Switch_2.png", - SelectedImagePath = "Public/SwitchOn_2.png", - IsSelected = UserInfo.Current.appUnlockType.Contains("1") - }; - passwordUnlockDiv.AddChidren(btnPasswordUnlockkSwtichIcon); +// var btnPasswordUnlockkSwtichIcon = new Button() +// { +// X = Application.GetRealWidth(322), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetMinRealAverage(38), +// Height = Application.GetMinRealAverage(38), +// UnSelectedImagePath = "Public/Switch_2.png", +// SelectedImagePath = "Public/SwitchOn_2.png", +// IsSelected = UserInfo.Current.appUnlockType.Contains("1") +// }; +// passwordUnlockDiv.AddChidren(btnPasswordUnlockkSwtichIcon); - btnPasswordUnlockTitle = new Button() - { - X = Application.GetRealWidth(66), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.PasswordUnlock, - }; - passwordUnlockDiv.AddChidren(btnPasswordUnlockTitle); +// btnPasswordUnlockTitle = new Button() +// { +// X = Application.GetRealWidth(66), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.PasswordUnlock, +// }; +// passwordUnlockDiv.AddChidren(btnPasswordUnlockTitle); - unlockOptionView.AddChidren(new Button() - { - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - Height = 1, - BackgroundColor = CSS_Color.BackgroundColor, - }); - #endregion +// unlockOptionView.AddChidren(new Button() +// { +// X = Application.GetRealWidth(16), +// Width = Application.GetRealWidth(343), +// Height = 1, +// BackgroundColor = CSS_Color.BackgroundColor, +// }); +// #endregion - #region 淇敼瀵嗙爜 - var resetPasswordDiv = new FrameLayout() - { - Height = Application.GetRealHeight(50), - }; - if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("1")) - { - unlockOptionView.AddChidren(resetPasswordDiv); - } - var btnPasswordUnlockRightIcon = new Button() - { - X = Application.GetRealWidth(339), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(16), - Height = Application.GetMinRealAverage(16), - UnSelectedImagePath = "Public/Right.png", - }; - resetPasswordDiv.AddChidren(btnPasswordUnlockRightIcon); +// #region 淇敼瀵嗙爜 +// var resetPasswordDiv = new FrameLayout() +// { +// Height = Application.GetRealHeight(50), +// }; +// if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("1")) +// { +// unlockOptionView.AddChidren(resetPasswordDiv); +// } +// var btnPasswordUnlockRightIcon = new Button() +// { +// X = Application.GetRealWidth(339), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetMinRealAverage(16), +// Height = Application.GetMinRealAverage(16), +// UnSelectedImagePath = "Public/Right.png", +// }; +// resetPasswordDiv.AddChidren(btnPasswordUnlockRightIcon); - btnResetPasswordTitle = new Button() - { - X = Application.GetRealWidth(66), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.ResetDigitalPassword, - }; - resetPasswordDiv.AddChidren(btnResetPasswordTitle); +// btnResetPasswordTitle = new Button() +// { +// X = Application.GetRealWidth(66), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.ResetDigitalPassword, +// }; +// resetPasswordDiv.AddChidren(btnResetPasswordTitle); - if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("1")) - { - unlockOptionView.AddChidren(new Button() - { - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - Height = 1, - BackgroundColor = CSS_Color.BackgroundColor, - }); - } - #endregion +// if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("1")) +// { +// unlockOptionView.AddChidren(new Button() +// { +// X = Application.GetRealWidth(16), +// Width = Application.GetRealWidth(343), +// Height = 1, +// BackgroundColor = CSS_Color.BackgroundColor, +// }); +// } +// #endregion - #region 鎵嬪娍瑙i攣 - var gestureUnlockDiv = new FrameLayout() - { - Height = Application.GetRealHeight(50), - }; - if (!UserInfo.Current.appUnlockType.Contains("1")) - { - unlockOptionView.AddChidren(gestureUnlockDiv); - } - var btnGestureUnlockIcon = new Button() - { - X = Application.GetRealWidth(16), - Gravity = Gravity.CenterVertical, - Width = Application.GetRealWidth(32), - Height = Application.GetRealWidth(32), - UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/GestureIcon.png", - }; - gestureUnlockDiv.AddChidren(btnGestureUnlockIcon); +// #region 鎵嬪娍瑙i攣 +// var gestureUnlockDiv = new FrameLayout() +// { +// Height = Application.GetRealHeight(50), +// }; +// if (!UserInfo.Current.appUnlockType.Contains("1")) +// { +// unlockOptionView.AddChidren(gestureUnlockDiv); +// } +// var btnGestureUnlockIcon = new Button() +// { +// X = Application.GetRealWidth(16), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetRealWidth(32), +// Height = Application.GetRealWidth(32), +// UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/GestureIcon.png", +// }; +// gestureUnlockDiv.AddChidren(btnGestureUnlockIcon); - //var btnGestureUnlockRightIcon = new Button() - //{ - // X = Application.GetRealWidth(339), - // Gravity = Gravity.CenterVertical, - // Width = Application.GetMinRealAverage(16), - // Height = Application.GetMinRealAverage(16), - // UnSelectedImagePath = "Public/Right.png", - //}; - //gestureUnlockDiv.AddChidren(btnGestureUnlockRightIcon); +// //var btnGestureUnlockRightIcon = new Button() +// //{ +// // X = Application.GetRealWidth(339), +// // Gravity = Gravity.CenterVertical, +// // Width = Application.GetMinRealAverage(16), +// // Height = Application.GetMinRealAverage(16), +// // UnSelectedImagePath = "Public/Right.png", +// //}; +// //gestureUnlockDiv.AddChidren(btnGestureUnlockRightIcon); - var btnGestureUnlockkSwtichIcon = new Button() - { - X = Application.GetRealWidth(322), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(38), - Height = Application.GetMinRealAverage(38), - UnSelectedImagePath = "Public/Switch_2.png", - SelectedImagePath = "Public/SwitchOn_2.png", - IsSelected = UserInfo.Current.appUnlockType.Contains("2") - }; - gestureUnlockDiv.AddChidren(btnGestureUnlockkSwtichIcon); +// var btnGestureUnlockkSwtichIcon = new Button() +// { +// X = Application.GetRealWidth(322), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetMinRealAverage(38), +// Height = Application.GetMinRealAverage(38), +// UnSelectedImagePath = "Public/Switch_2.png", +// SelectedImagePath = "Public/SwitchOn_2.png", +// IsSelected = UserInfo.Current.appUnlockType.Contains("2") +// }; +// gestureUnlockDiv.AddChidren(btnGestureUnlockkSwtichIcon); - btnGestureUnlockTitle = new Button() - { - X = Application.GetRealWidth(66), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.GestureUnlock, - }; - gestureUnlockDiv.AddChidren(btnGestureUnlockTitle); +// btnGestureUnlockTitle = new Button() +// { +// X = Application.GetRealWidth(66), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.GestureUnlock, +// }; +// gestureUnlockDiv.AddChidren(btnGestureUnlockTitle); - if (!UserInfo.Current.appUnlockType.Contains("1")) - { - unlockOptionView.AddChidren(new Button() - { - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - Height = 1, - BackgroundColor = CSS_Color.BackgroundColor, - }); - } - #endregion +// if (!UserInfo.Current.appUnlockType.Contains("1")) +// { +// unlockOptionView.AddChidren(new Button() +// { +// X = Application.GetRealWidth(16), +// Width = Application.GetRealWidth(343), +// Height = 1, +// BackgroundColor = CSS_Color.BackgroundColor, +// }); +// } +// #endregion - #region 淇敼鎵嬪娍 - var resetGestureDiv = new FrameLayout() - { - Height = Application.GetRealHeight(50), - }; - if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("2")) - { - unlockOptionView.AddChidren(resetGestureDiv); - } - var btnGestureRightIcon = new Button() - { - X = Application.GetRealWidth(339), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(16), - Height = Application.GetMinRealAverage(16), - UnSelectedImagePath = "Public/Right.png", - }; - resetGestureDiv.AddChidren(btnGestureRightIcon); +// #region 淇敼鎵嬪娍 +// var resetGestureDiv = new FrameLayout() +// { +// Height = Application.GetRealHeight(50), +// }; +// if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("2")) +// { +// unlockOptionView.AddChidren(resetGestureDiv); +// } +// var btnGestureRightIcon = new Button() +// { +// X = Application.GetRealWidth(339), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetMinRealAverage(16), +// Height = Application.GetMinRealAverage(16), +// UnSelectedImagePath = "Public/Right.png", +// }; +// resetGestureDiv.AddChidren(btnGestureRightIcon); - btnResetGestureTitle = new Button() - { - X = Application.GetRealWidth(66), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.ResetGesturePassword, - }; - resetGestureDiv.AddChidren(btnResetGestureTitle); +// btnResetGestureTitle = new Button() +// { +// X = Application.GetRealWidth(66), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.ResetGesturePassword, +// }; +// resetGestureDiv.AddChidren(btnResetGestureTitle); - if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("2")) - { - unlockOptionView.AddChidren(new Button() - { - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - Height = 1, - BackgroundColor = CSS_Color.BackgroundColor, - }); - } - #endregion +// if (UserInfo.Current.appUnlockPasswrod != "" && UserInfo.Current.appUnlockType.Contains("2")) +// { +// unlockOptionView.AddChidren(new Button() +// { +// X = Application.GetRealWidth(16), +// Width = Application.GetRealWidth(343), +// Height = 1, +// BackgroundColor = CSS_Color.BackgroundColor, +// }); +// } +// #endregion - #region 鏌ヨ璁惧鏄惁鏀寔闈㈠ID锛屾寚绾笽D - TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType(); - if (type == TouchIDUtils.TouchIDSupperType.TouchID) - { - sTouchID = true; - MainPage.Log("KK锛氭敮鎸乀ouchID"); - } - else if (type == TouchIDUtils.TouchIDSupperType.FaceID) - { - sFaceID = true; - MainPage.Log("KK锛氭敮鎸丗aceID"); - } +// #region 鏌ヨ璁惧鏄惁鏀寔闈㈠ID锛屾寚绾笽D +// TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType(); +// if (type == TouchIDUtils.TouchIDSupperType.TouchID) +// { +// sTouchID = true; +// MainPage.Log("KK锛氭敮鎸乀ouchID"); +// } +// else if (type == TouchIDUtils.TouchIDSupperType.FaceID) +// { +// sFaceID = true; +// MainPage.Log("KK锛氭敮鎸丗aceID"); +// } - #endregion +// #endregion - #region 鎸囩汗瑙i攣 - fingerprintUnlockDiv = new FrameLayout() - { - Height = Application.GetRealHeight(51), - }; - if (sTouchID && UserInfo.Current.appUnlockPasswrod != "" && !UserInfo.Current.appUnlockType.Contains("4")) - { - unlockOptionView.AddChidren(fingerprintUnlockDiv); - } +// #region 鎸囩汗瑙i攣 +// fingerprintUnlockDiv = new FrameLayout() +// { +// Height = Application.GetRealHeight(51), +// }; +// if (sTouchID && UserInfo.Current.appUnlockPasswrod != "" && !UserInfo.Current.appUnlockType.Contains("4")) +// { +// unlockOptionView.AddChidren(fingerprintUnlockDiv); +// } - var btnFingerprintUnlockIcon = new Button() - { - X = Application.GetRealWidth(16), - Gravity = Gravity.CenterVertical, - Width = Application.GetRealWidth(32), - Height = Application.GetRealWidth(32), - UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/FingerprintIcon.png", - }; - fingerprintUnlockDiv.AddChidren(btnFingerprintUnlockIcon); +// var btnFingerprintUnlockIcon = new Button() +// { +// X = Application.GetRealWidth(16), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetRealWidth(32), +// Height = Application.GetRealWidth(32), +// UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/FingerprintIcon.png", +// }; +// fingerprintUnlockDiv.AddChidren(btnFingerprintUnlockIcon); - var btnFingerprintUnlockTitle = new Button() - { - X = Application.GetRealWidth(66), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.FingerprintUnlock, - }; - fingerprintUnlockDiv.AddChidren(btnFingerprintUnlockTitle); +// var btnFingerprintUnlockTitle = new Button() +// { +// X = Application.GetRealWidth(66), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.FingerprintUnlock, +// }; +// fingerprintUnlockDiv.AddChidren(btnFingerprintUnlockTitle); - btnFingerprintUnlockSwtichIcon = new Button() - { - X = Application.GetRealWidth(322), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(38), - Height = Application.GetMinRealAverage(38), - UnSelectedImagePath = "Public/Switch_2.png", - SelectedImagePath = "Public/SwitchOn_2.png", - IsSelected = UserInfo.Current.appUnlockType.Contains("3") - }; - fingerprintUnlockDiv.AddChidren(btnFingerprintUnlockSwtichIcon); +// btnFingerprintUnlockSwtichIcon = new Button() +// { +// X = Application.GetRealWidth(322), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetMinRealAverage(38), +// Height = Application.GetMinRealAverage(38), +// UnSelectedImagePath = "Public/Switch_2.png", +// SelectedImagePath = "Public/SwitchOn_2.png", +// IsSelected = UserInfo.Current.appUnlockType.Contains("3") +// }; +// fingerprintUnlockDiv.AddChidren(btnFingerprintUnlockSwtichIcon); - fingerprintUnlockDiv.AddChidren(new Button() - { - X = Application.GetRealWidth(16), - Y = Application.GetRealHeight(50), - Width = Application.GetRealWidth(343), - Height = 1, - BackgroundColor = CSS_Color.BackgroundColor, - //Visible = sFaceID - }); +// fingerprintUnlockDiv.AddChidren(new Button() +// { +// X = Application.GetRealWidth(16), +// Y = Application.GetRealHeight(50), +// Width = Application.GetRealWidth(343), +// Height = 1, +// BackgroundColor = CSS_Color.BackgroundColor, +// //Visible = sFaceID +// }); - #endregion +// #endregion - #region 闈㈠ID瑙i攣 - faceIdUnlockDiv = new FrameLayout() - { - Height = Application.GetRealHeight(50), - }; - if (sFaceID && UserInfo.Current.appUnlockPasswrod != "" && !UserInfo.Current.appUnlockType.Contains("3")) - { - unlockOptionView.AddChidren(faceIdUnlockDiv); - } - var btnFaceIdUnlockIcon = new Button() - { - X = Application.GetRealWidth(16), - Gravity = Gravity.CenterVertical, - Width = Application.GetRealWidth(32), - Height = Application.GetRealWidth(32), - UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/FaceIdIcon.png", - }; - faceIdUnlockDiv.AddChidren(btnFaceIdUnlockIcon); +// #region 闈㈠ID瑙i攣 +// faceIdUnlockDiv = new FrameLayout() +// { +// Height = Application.GetRealHeight(50), +// }; +// if (sFaceID && UserInfo.Current.appUnlockPasswrod != "" && !UserInfo.Current.appUnlockType.Contains("3")) +// { +// unlockOptionView.AddChidren(faceIdUnlockDiv); +// } +// var btnFaceIdUnlockIcon = new Button() +// { +// X = Application.GetRealWidth(16), +// Gravity = Gravity.CenterVertical, +// Width = Application.GetRealWidth(32), +// Height = Application.GetRealWidth(32), +// UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/FaceIdIcon.png", +// }; +// faceIdUnlockDiv.AddChidren(btnFaceIdUnlockIcon); - var btnFaceIdUnlockTitle = new Button() - { - X = Application.GetRealWidth(66), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - TextID = StringId.FaceIdUnlock, - }; - faceIdUnlockDiv.AddChidren(btnFaceIdUnlockTitle); +// var btnFaceIdUnlockTitle = new Button() +// { +// X = Application.GetRealWidth(66), +// TextAlignment = TextAlignment.CenterLeft, +// TextColor = CSS_Color.FirstLevelTitleColor, +// TextSize = CSS_FontSize.TextFontSize, +// TextID = StringId.FaceIdUnlock, +// }; +// faceIdUnlockDiv.AddChidren(btnFaceIdUnlockTitle); - btnFaceIdUnlockSwtichIcon = new Button() - { - X = Application.GetRealWidth(322), - Gravity= Gravity.CenterVertical, - Width = Application.GetMinRealAverage(38), - Height = Application.GetMinRealAverage(38), - UnSelectedImagePath = "Public/Switch_2.png", - SelectedImagePath = "Public/SwitchOn_2.png", - IsSelected = UserInfo.Current.appUnlockType.Contains("4") - }; - faceIdUnlockDiv.AddChidren(btnFaceIdUnlockSwtichIcon); +// btnFaceIdUnlockSwtichIcon = new Button() +// { +// X = Application.GetRealWidth(322), +// Gravity= Gravity.CenterVertical, +// Width = Application.GetMinRealAverage(38), +// Height = Application.GetMinRealAverage(38), +// UnSelectedImagePath = "Public/Switch_2.png", +// SelectedImagePath = "Public/SwitchOn_2.png", +// IsSelected = UserInfo.Current.appUnlockType.Contains("4") +// }; +// faceIdUnlockDiv.AddChidren(btnFaceIdUnlockSwtichIcon); - #endregion +// #endregion - LoadEvet_SkipEventList(); +// //LoadEvet_SkipEventList(); - } +// } - } -} +// } +//} diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs index 43e9dc3..3c02d0d 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs @@ -1,551 +1,551 @@ -锘縰sing System; -using Shared; +锘�//using System; +//using Shared; -namespace HDL_ON.UI -{ - public partial class AppUnlockSettingsPage - { - Action refreshAction; - void LoadEventList() - { - LoadEvent_OptionChange(); - LoadEvent_InitOptionState(); +//namespace HDL_ON.UI +//{ +// public partial class AppUnlockSettingsPage +// { +// Action refreshAction; +// void LoadEventList() +// { +// LoadEvent_OptionChange(); +// LoadEvent_InitOptionState(); - refreshAction = () => - { - LoadView_UnlockView(); - //fingerprintUnlockDiv.Visible = sTouchID && (UserInfo.Current.appUnlockType.Contains("1") || UserInfo.Current.appUnlockType.Contains("2")); - //faceIdUnlockDiv.Visible = sFaceID && (UserInfo.Current.appUnlockType.Contains("1") || UserInfo.Current.appUnlockType.Contains("2")); - //btnFingerprintUnlockSwtichIcon.IsSelected = UserInfo.Current.appUnlockType.Contains("3"); - //btnFaceIdUnlockSwtichIcon.IsSelected = UserInfo.Current.appUnlockType.Contains("4"); - }; - } +// refreshAction = () => +// { +// LoadView_UnlockView(); +// //fingerprintUnlockDiv.Visible = sTouchID && (UserInfo.Current.appUnlockType.Contains("1") || UserInfo.Current.appUnlockType.Contains("2")); +// //faceIdUnlockDiv.Visible = sFaceID && (UserInfo.Current.appUnlockType.Contains("1") || UserInfo.Current.appUnlockType.Contains("2")); +// //btnFingerprintUnlockSwtichIcon.IsSelected = UserInfo.Current.appUnlockType.Contains("3"); +// //btnFaceIdUnlockSwtichIcon.IsSelected = UserInfo.Current.appUnlockType.Contains("4"); +// }; +// } - /// <summary> - /// 鍔犺浇瀵嗙爜閫夐」浜嬩欢 - /// </summary> - void LoadEvent_OptionChange() - { - EventHandler<MouseEventArgs> eventHandler1 = (sender, e1) => - { - Action action = () => - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = false; - #region F3闃舵 - //btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = false; - btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false; - #endregion +// /// <summary> +// /// 鍔犺浇瀵嗙爜閫夐」浜嬩欢 +// /// </summary> +// void LoadEvent_OptionChange() +// { +// EventHandler<MouseEventArgs> eventHandler1 = (sender, e1) => +// { +// Action action = () => +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; +// btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = false; +// #region F3闃舵 +// //btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = false; +// btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false; +// #endregion - btnTipMsg.TextID = StringId.UnprotectedTipMsg; +// btnTipMsg.TextID = StringId.UnprotectedTipMsg; - UserInfo.Current.appUnlockPage = new System.Collections.Generic.List<string>(); - UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>(); - UserInfo.Current.appUnlockPasswrod = ""; - UserInfo.Current.SaveUserInfo(); - unlockOptionView.Visible = false; - refreshAction(); - }; - Action action1 = () => - { - if (!btnUnprotectedBg.IsSelected) - { - //1:楠岃瘉鎸囩汗 - if (UserInfo.Current.appUnlockType.Contains("3")) - { - TouchIDVerification_TurnOffUnlock(action); - } - else if (UserInfo.Current.appUnlockType.Contains("4")) - { - //Face ID楠岃瘉 - FaceIDVerification_TurnOffUnlock(action); - } - else if (UserInfo.Current.appUnlockType.Contains("1")) - { - var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("4"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - else if (UserInfo.Current.appUnlockType.Contains("2")) - { - var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, action); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("4"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - } - }; +// UserInfo.Current.appUnlockPage = new System.Collections.Generic.List<string>(); +// UserInfo.Current.appUnlockType = new System.Collections.Generic.List<string>(); +// UserInfo.Current.appUnlockPasswrod = ""; +// UserInfo.Current.SaveUserInfo(); +// unlockOptionView.Visible = false; +// refreshAction(); +// }; +// Action action1 = () => +// { +// if (!btnUnprotectedBg.IsSelected) +// { +// //1:楠岃瘉鎸囩汗 +// if (UserInfo.Current.appUnlockType.Contains("3")) +// { +// TouchIDVerification_TurnOffUnlock(action); +// } +// else if (UserInfo.Current.appUnlockType.Contains("4")) +// { +// //Face ID楠岃瘉 +// FaceIDVerification_TurnOffUnlock(action); +// } +// else if (UserInfo.Current.appUnlockType.Contains("1")) +// { +// var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, action); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("4"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// else if (UserInfo.Current.appUnlockType.Contains("2")) +// { +// var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, action); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("4"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// } +// }; - if (UserInfo.Current.appUnlockPasswrod != "") - { - new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.TipTurnOffUnlockingSetting, action1); - } - else - { - action(); - } - }; - btnUnprotectedBg.MouseUpEventHandler = eventHandler1; - btnUnprotectedSelectionIcon.MouseUpEventHandler = eventHandler1; - btnUnprotectedSelectionTip.MouseUpEventHandler = eventHandler1; +// if (UserInfo.Current.appUnlockPasswrod != "") +// { +// new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.TipTurnOffUnlockingSetting, action1); +// } +// else +// { +// action(); +// } +// }; +// btnUnprotectedBg.MouseUpEventHandler = eventHandler1; +// btnUnprotectedSelectionIcon.MouseUpEventHandler = eventHandler1; +// btnUnprotectedSelectionTip.MouseUpEventHandler = eventHandler1; - EventHandler<MouseEventArgs> eventHandler2 = (sender, e) => - { - bool result = !btnStartupBg.IsSelected; - if (!result) - { - //濡傛灉鍚姩瑙i攣 涓嶈兘鍙栨秷鍚姩瑙i攣 - if (!CheckIfCanDeselect("1")) return; - } - btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = result; +// EventHandler<MouseEventArgs> eventHandler2 = (sender, e) => +// { +// bool result = !btnStartupBg.IsSelected; +// if (!result) +// { +// //濡傛灉鍚姩瑙i攣 涓嶈兘鍙栨秷鍚姩瑙i攣 +// if (!CheckIfCanDeselect("1")) return; +// } +// btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = result; - btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); - if (result) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; - if (!UserInfo.Current.appUnlockPage.Contains("1")) - { - UserInfo.Current.appUnlockPage.Add("1"); - if (UserInfo.Current.appUnlockPasswrod != "") - UserInfo.Current.SaveUserInfo(); - } - unlockOptionView.Visible = true; - } - else - { - if (UserInfo.Current.appUnlockPage.Contains("1")) - { - UserInfo.Current.appUnlockPage.Remove("1"); - } - if (UserInfo.Current.appUnlockPage.Count == 0) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - btnTipMsg.TextID = StringId.UnprotectedTipMsg; - UserInfo.Current.appUnlockPasswrod = ""; - unlockOptionView.Visible = false; - refreshAction(); - } - UserInfo.Current.SaveUserInfo(); - } - }; - btnStartupBg.MouseUpEventHandler = eventHandler2; - btnStartupSelectionIcon.MouseUpEventHandler = eventHandler2; - btnStartupSelectionTip.MouseUpEventHandler = eventHandler2; +// btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); +// if (result) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; +// if (!UserInfo.Current.appUnlockPage.Contains("1")) +// { +// UserInfo.Current.appUnlockPage.Add("1"); +// if (UserInfo.Current.appUnlockPasswrod != "") +// UserInfo.Current.SaveUserInfo(); +// } +// unlockOptionView.Visible = true; +// } +// else +// { +// if (UserInfo.Current.appUnlockPage.Contains("1")) +// { +// UserInfo.Current.appUnlockPage.Remove("1"); +// } +// if (UserInfo.Current.appUnlockPage.Count == 0) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; +// btnTipMsg.TextID = StringId.UnprotectedTipMsg; +// UserInfo.Current.appUnlockPasswrod = ""; +// unlockOptionView.Visible = false; +// refreshAction(); +// } +// UserInfo.Current.SaveUserInfo(); +// } +// }; +// btnStartupBg.MouseUpEventHandler = eventHandler2; +// btnStartupSelectionIcon.MouseUpEventHandler = eventHandler2; +// btnStartupSelectionTip.MouseUpEventHandler = eventHandler2; - #region F3闃舵 - //EventHandler<MouseEventArgs> eventHandler3 = (sender, e) => - //{ - // bool result = !btnSecurityBg.IsSelected; - // if (!result) - // { - // //濡傛灉鍙墿甯冮槻/鎾ら槻涓�绉� 涓嶈兘鍙栨秷甯冮槻/鎾ら槻 - // if (!CheckIfCanDeselect("2")) return; - // } - // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = result; - // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); - // if (result) - // { - // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; - // if (!UserInfo.Current.appUnlockPage.Contains("2")) - // { - // UserInfo.Current.appUnlockPage.Add("2"); - // if (UserInfo.Current.appUnlockPasswrod != "") - // UserInfo.Current.SaveUserInfo(); - // } - // unlockOptionView.Visible = true; - // } - // else - // { - // if (UserInfo.Current.appUnlockPage.Contains("2")) - // { - // UserInfo.Current.appUnlockPage.Remove("2"); - // } - // if (UserInfo.Current.appUnlockPage.Count == 0) - // { - // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = result; - // btnTipMsg.TextID = StringId.UnprotectedTipMsg; - // UserInfo.Current.appUnlockPasswrod = ""; - // unlockOptionView.Visible = false; - // refreshAction(); - // } - // UserInfo.Current.SaveUserInfo(); - // } - //}; - //btnSecurityBg.MouseUpEventHandler = eventHandler3; - //btnSecuritySelectionIcon.MouseUpEventHandler = eventHandler3; - //btnSecuritySelectionTip.MouseUpEventHandler = eventHandler3; +// #region F3闃舵 +// //EventHandler<MouseEventArgs> eventHandler3 = (sender, e) => +// //{ +// // bool result = !btnSecurityBg.IsSelected; +// // if (!result) +// // { +// // //濡傛灉鍙墿甯冮槻/鎾ら槻涓�绉� 涓嶈兘鍙栨秷甯冮槻/鎾ら槻 +// // if (!CheckIfCanDeselect("2")) return; +// // } +// // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = result; +// // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); +// // if (result) +// // { +// // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; +// // if (!UserInfo.Current.appUnlockPage.Contains("2")) +// // { +// // UserInfo.Current.appUnlockPage.Add("2"); +// // if (UserInfo.Current.appUnlockPasswrod != "") +// // UserInfo.Current.SaveUserInfo(); +// // } +// // unlockOptionView.Visible = true; +// // } +// // else +// // { +// // if (UserInfo.Current.appUnlockPage.Contains("2")) +// // { +// // UserInfo.Current.appUnlockPage.Remove("2"); +// // } +// // if (UserInfo.Current.appUnlockPage.Count == 0) +// // { +// // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = result; +// // btnTipMsg.TextID = StringId.UnprotectedTipMsg; +// // UserInfo.Current.appUnlockPasswrod = ""; +// // unlockOptionView.Visible = false; +// // refreshAction(); +// // } +// // UserInfo.Current.SaveUserInfo(); +// // } +// //}; +// //btnSecurityBg.MouseUpEventHandler = eventHandler3; +// //btnSecuritySelectionIcon.MouseUpEventHandler = eventHandler3; +// //btnSecuritySelectionTip.MouseUpEventHandler = eventHandler3; - EventHandler<MouseEventArgs> eventHandler4 = (sender, e) => - { - bool result = !btnDoorlockBg.IsSelected; - if (!result) - { - //濡傛灉鍙墿杩滅▼寮�閿佷笉鑳藉彇娑堣繙绋嬪紑閿� - if (!CheckIfCanDeselect("3")) return; - } +// EventHandler<MouseEventArgs> eventHandler4 = (sender, e) => +// { +// bool result = !btnDoorlockBg.IsSelected; +// if (!result) +// { +// //濡傛灉鍙墿杩滅▼寮�閿佷笉鑳藉彇娑堣繙绋嬪紑閿� +// if (!CheckIfCanDeselect("3")) return; +// } - btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = result; +// btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = result; - btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); - if (result) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; - if (!UserInfo.Current.appUnlockPage.Contains("3")) - { - UserInfo.Current.appUnlockPage.Add("3"); - if (UserInfo.Current.appUnlockPasswrod != "") - UserInfo.Current.SaveUserInfo(); - } - unlockOptionView.Visible = true; - } - else - { - if (UserInfo.Current.appUnlockPage.Contains("3")) - { - UserInfo.Current.appUnlockPage.Remove("3"); - } - if (UserInfo.Current.appUnlockPage.Count == 0) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - btnTipMsg.TextID = StringId.UnprotectedTipMsg; - UserInfo.Current.appUnlockPasswrod = ""; - unlockOptionView.Visible = false; - refreshAction(); - } - UserInfo.Current.SaveUserInfo(); - } - }; - btnDoorlockBg.MouseUpEventHandler = eventHandler4; - btnDoorlockSelectionIcon.MouseUpEventHandler = eventHandler4; - btnDoorlockSelectionTip.MouseUpEventHandler = eventHandler4; - #endregion - } +// btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); +// if (result) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; +// if (!UserInfo.Current.appUnlockPage.Contains("3")) +// { +// UserInfo.Current.appUnlockPage.Add("3"); +// if (UserInfo.Current.appUnlockPasswrod != "") +// UserInfo.Current.SaveUserInfo(); +// } +// unlockOptionView.Visible = true; +// } +// else +// { +// if (UserInfo.Current.appUnlockPage.Contains("3")) +// { +// UserInfo.Current.appUnlockPage.Remove("3"); +// } +// if (UserInfo.Current.appUnlockPage.Count == 0) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; +// btnTipMsg.TextID = StringId.UnprotectedTipMsg; +// UserInfo.Current.appUnlockPasswrod = ""; +// unlockOptionView.Visible = false; +// refreshAction(); +// } +// UserInfo.Current.SaveUserInfo(); +// } +// }; +// btnDoorlockBg.MouseUpEventHandler = eventHandler4; +// btnDoorlockSelectionIcon.MouseUpEventHandler = eventHandler4; +// btnDoorlockSelectionTip.MouseUpEventHandler = eventHandler4; +// #endregion +// } - /// <summary> - /// 鍔犺浇鐢ㄦ埛瀵嗙爜閫夐」鐘舵�� - /// </summary> - void LoadEvent_InitOptionState() - { - if (UserInfo.Current.appUnlockPage.Count == 0) - { - btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - } - else - { - if (UserInfo.Current.appUnlockPage.Contains("1")) - { - btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = true; - btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); - } - #region F3闃舵 - //if (UserInfo.Current.appUnlockPage.Contains("2")) - //{ - // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = true; - // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); - //} - if (UserInfo.Current.appUnlockPage.Contains("3")) - { - btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = true; - btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); - } - #endregion - } - } +// /// <summary> +// /// 鍔犺浇鐢ㄦ埛瀵嗙爜閫夐」鐘舵�� +// /// </summary> +// void LoadEvent_InitOptionState() +// { +// if (UserInfo.Current.appUnlockPage.Count == 0) +// { +// btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; +// } +// else +// { +// if (UserInfo.Current.appUnlockPage.Contains("1")) +// { +// btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = true; +// btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg); +// } +// #region F3闃舵 +// //if (UserInfo.Current.appUnlockPage.Contains("2")) +// //{ +// // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = true; +// // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); +// //} +// if (UserInfo.Current.appUnlockPage.Contains("3")) +// { +// btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = true; +// btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); +// } +// #endregion +// } +// } - /// <summary> - /// 瀵嗙爜璁剧疆璺宠浆浜嬩欢鍒楄〃 - /// </summary> - void LoadEvet_SkipEventList() - { - btnPasswordUnlockTitle.MouseUpEventHandler = (sender, e) => - { - var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(UserInfo.Current.appUnlockType.Contains("1") ? "3" : "1"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; +// /// <summary> +// /// 瀵嗙爜璁剧疆璺宠浆浜嬩欢鍒楄〃 +// /// </summary> +// void LoadEvet_SkipEventList() +// { +// btnPasswordUnlockTitle.MouseUpEventHandler = (sender, e) => +// { +// var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(UserInfo.Current.appUnlockType.Contains("1") ? "3" : "1"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; - btnResetPasswordTitle.MouseUpEventHandler = (sender, e) => - { - var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("2"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; +// btnResetPasswordTitle.MouseUpEventHandler = (sender, e) => +// { +// var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, refreshAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("2"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; - btnGestureUnlockTitle.MouseUpEventHandler = (sender, e) => - { - var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(UserInfo.Current.appUnlockType.Contains("2") ? "3" : "1"); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; - btnResetGestureTitle.MouseUpEventHandler = (sender, e) => - { - var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage("2");//2020-12-11 - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; +// btnGestureUnlockTitle.MouseUpEventHandler = (sender, e) => +// { +// var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(UserInfo.Current.appUnlockType.Contains("2") ? "3" : "1"); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; +// btnResetGestureTitle.MouseUpEventHandler = (sender, e) => +// { +// var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, refreshAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage("2");//2020-12-11 +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// }; - if (sTouchID) - { - btnFingerprintUnlockSwtichIcon.MouseUpEventHandler = (sender, e1) => - { - TouchIDVerification_SwtichOnOff(); - }; - } - if (sFaceID) - { - btnFaceIdUnlockSwtichIcon.MouseUpEventHandler = (sender, e1) => - { - FaceIDVerification_SwtichOnOff(); - }; - } - } +// if (sTouchID) +// { +// btnFingerprintUnlockSwtichIcon.MouseUpEventHandler = (sender, e1) => +// { +// TouchIDVerification_SwtichOnOff(); +// }; +// } +// if (sFaceID) +// { +// btnFaceIdUnlockSwtichIcon.MouseUpEventHandler = (sender, e1) => +// { +// FaceIDVerification_SwtichOnOff(); +// }; +// } +// } - /// <summary> - /// 鍒ゆ柇鏄惁鑳藉鍙栨秷锛屽鏋滃彧鍓╂渶鍚庝竴绉嶈В閿佹柟妗堢姝㈠彇娑� - /// </summary> - /// <param name="appUnlockPageType">1:鍚姩鏃� 2:甯冮槻鎾ら槻鏃� 3:杩滅▼寮�閿佹椂</param> - /// <returns></returns> - bool CheckIfCanDeselect(string appUnlockPageType) - { - if (UserInfo.Current.appUnlockPage.Count == 1 && UserInfo.Current.appUnlockPage.Contains(appUnlockPageType)) - { - return false; - } +// /// <summary> +// /// 鍒ゆ柇鏄惁鑳藉鍙栨秷锛屽鏋滃彧鍓╂渶鍚庝竴绉嶈В閿佹柟妗堢姝㈠彇娑� +// /// </summary> +// /// <param name="appUnlockPageType">1:鍚姩鏃� 2:甯冮槻鎾ら槻鏃� 3:杩滅▼寮�閿佹椂</param> +// /// <returns></returns> +// bool CheckIfCanDeselect(string appUnlockPageType) +// { +// if (UserInfo.Current.appUnlockPage.Count == 1 && UserInfo.Current.appUnlockPage.Contains(appUnlockPageType)) +// { +// return false; +// } - return true; - } +// return true; +// } - /// <summary> - /// 闈㈠ID楠岃瘉寮圭獥 - /// </summary> - /// <param name="successAction"></param> - /// <param name="goToVerifyPasswordAction"></param> - void FaceIDVerification_Show(Action successAction, Action goToVerifyPasswordAction) - { - //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 - string verificationTitleString = GetVerificationTitleString(); +// /// <summary> +// /// 闈㈠ID楠岃瘉寮圭獥 +// /// </summary> +// /// <param name="successAction"></param> +// /// <param name="goToVerifyPasswordAction"></param> +// void FaceIDVerification_Show(Action successAction, Action goToVerifyPasswordAction) +// { +// //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 +// string verificationTitleString = GetVerificationTitleString(); - TouchIDUtils.Instance.showTouchIDWithDescribe(verificationTitleString, Language.StringByID(StringId.VerifyFaceID)); - TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => - { - if (e == TouchIDUtils.TouchIDState.Success) - { - MainPage.Log("KK:FaceID楠岃瘉鎴愬姛"); - successAction?.Invoke(); - } - else if (e == TouchIDUtils.TouchIDState.NotSupport) - { - MainPage.Log("KK:褰撳墠璁惧涓嶆敮鎸丗aceID楠岃瘉,璇疯緭鍏ュ瘑鐮佹潵楠岃瘉"); - goToVerifyPasswordAction(); - } - else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) - { - MainPage.Log("KK:鐢ㄦ埛閫夋嫨鎵嬪姩杈撳叆瀵嗙爜"); - goToVerifyPasswordAction(); - } - }; - } +// TouchIDUtils.Instance.showTouchIDWithDescribe(verificationTitleString, Language.StringByID(StringId.VerifyFaceID)); +// TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => +// { +// if (e == TouchIDUtils.TouchIDState.Success) +// { +// MainPage.Log("KK:FaceID楠岃瘉鎴愬姛"); +// successAction?.Invoke(); +// } +// else if (e == TouchIDUtils.TouchIDState.NotSupport) +// { +// MainPage.Log("KK:褰撳墠璁惧涓嶆敮鎸丗aceID楠岃瘉,璇疯緭鍏ュ瘑鐮佹潵楠岃瘉"); +// goToVerifyPasswordAction(); +// } +// else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) +// { +// MainPage.Log("KK:鐢ㄦ埛閫夋嫨鎵嬪姩杈撳叆瀵嗙爜"); +// goToVerifyPasswordAction(); +// } +// }; +// } - /// <summary> - /// 闈㈠ID寮�鍚拰鍏抽棴 - /// </summary> - /// <param name="successAction">楠岃瘉鎴愬姛浜嬩欢</param> - void FaceIDVerification_SwtichOnOff() - { - //4:闈㈠ID - string faceIDUnlockType = "4"; - //6:闈㈠ID寮�鍏� - string optionType = "6"; - //鎴愬姛浜嬩欢 - Action successAction = () => - { - var result = btnFaceIdUnlockSwtichIcon.IsSelected = !btnFaceIdUnlockSwtichIcon.IsSelected; - if (result) - { - if (!UserInfo.Current.appUnlockType.Contains(faceIDUnlockType)) - { - UserInfo.Current.appUnlockType.Add(faceIDUnlockType); - UserInfo.Current.SaveUserInfo(); - } - } - else - { - if (UserInfo.Current.appUnlockType.Contains(faceIDUnlockType)) - { - UserInfo.Current.appUnlockType.Remove(faceIDUnlockType); - UserInfo.Current.SaveUserInfo(); - } - } - }; +// /// <summary> +// /// 闈㈠ID寮�鍚拰鍏抽棴 +// /// </summary> +// /// <param name="successAction">楠岃瘉鎴愬姛浜嬩欢</param> +// void FaceIDVerification_SwtichOnOff() +// { +// //4:闈㈠ID +// string faceIDUnlockType = "4"; +// //6:闈㈠ID寮�鍏� +// string optionType = "6"; +// //鎴愬姛浜嬩欢 +// Action successAction = () => +// { +// var result = btnFaceIdUnlockSwtichIcon.IsSelected = !btnFaceIdUnlockSwtichIcon.IsSelected; +// if (result) +// { +// if (!UserInfo.Current.appUnlockType.Contains(faceIDUnlockType)) +// { +// UserInfo.Current.appUnlockType.Add(faceIDUnlockType); +// UserInfo.Current.SaveUserInfo(); +// } +// } +// else +// { +// if (UserInfo.Current.appUnlockType.Contains(faceIDUnlockType)) +// { +// UserInfo.Current.appUnlockType.Remove(faceIDUnlockType); +// UserInfo.Current.SaveUserInfo(); +// } +// } +// }; - //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� - Action goToVerifyPasswordAction = () => - { - //鍏抽棴瑙i攣楠岃瘉 - GotogoToVerifyPasswordPage(optionType, successAction); - }; +// //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� +// Action goToVerifyPasswordAction = () => +// { +// //鍏抽棴瑙i攣楠岃瘉 +// GotogoToVerifyPasswordPage(optionType, successAction); +// }; - FaceIDVerification_Show(successAction, goToVerifyPasswordAction); +// FaceIDVerification_Show(successAction, goToVerifyPasswordAction); - } +// } - /// <summary> - /// FaceID楠岃瘉 鍏抽棴瑙i攣璁剧疆 - /// </summary> - /// <param name="action">楠岃瘉鎴愬姛浜嬩欢</param> - void FaceIDVerification_TurnOffUnlock(Action successAction) - { - //璋冩暣鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� - Action goToVerifyPasswordAction = () => - { - //鍏抽棴瑙i攣楠岃瘉 - GotogoToVerifyPasswordPage("4", successAction); - }; +// /// <summary> +// /// FaceID楠岃瘉 鍏抽棴瑙i攣璁剧疆 +// /// </summary> +// /// <param name="action">楠岃瘉鎴愬姛浜嬩欢</param> +// void FaceIDVerification_TurnOffUnlock(Action successAction) +// { +// //璋冩暣鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� +// Action goToVerifyPasswordAction = () => +// { +// //鍏抽棴瑙i攣楠岃瘉 +// GotogoToVerifyPasswordPage("4", successAction); +// }; - FaceIDVerification_Show(successAction, goToVerifyPasswordAction); - } +// FaceIDVerification_Show(successAction, goToVerifyPasswordAction); +// } - /// <summary> - /// 鎸囩汗ID缁熶竴寮瑰嚭 - /// </summary> - /// <param name="optionType"></param> - /// <param name="successAction"></param> - /// <param name="goToVerifyPasswordAction"></param> - void TouchIDVerification_Show(Action successAction, Action goToVerifyPasswordAction) - { - //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 - string verificationTitleString = GetVerificationTitleString(); +// /// <summary> +// /// 鎸囩汗ID缁熶竴寮瑰嚭 +// /// </summary> +// /// <param name="optionType"></param> +// /// <param name="successAction"></param> +// /// <param name="goToVerifyPasswordAction"></param> +// void TouchIDVerification_Show(Action successAction, Action goToVerifyPasswordAction) +// { +// //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 +// string verificationTitleString = GetVerificationTitleString(); - TouchIDUtils.Instance.showTouchIDWithDescribe(verificationTitleString, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); - TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => - { - if (e == TouchIDUtils.TouchIDState.NotSupport) - { - MainPage.Log("KK:褰撳墠璁惧涓嶆敮鎸乀ouchID楠岃瘉,璇疯緭鍏ュ瘑鐮佹潵楠岃瘉"); - goToVerifyPasswordAction?.Invoke(); - } - else if (e == TouchIDUtils.TouchIDState.Success) - { - MainPage.Log("KK:TouchID楠岃瘉鎴愬姛"); - successAction?.Invoke(); - } - else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) - { - MainPage.Log("KK:鐢ㄦ埛閫夋嫨鎵嬪姩杈撳叆瀵嗙爜"); - goToVerifyPasswordAction?.Invoke(); - } +// TouchIDUtils.Instance.showTouchIDWithDescribe(verificationTitleString, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); +// TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = (sender1, e) => +// { +// if (e == TouchIDUtils.TouchIDState.NotSupport) +// { +// MainPage.Log("KK:褰撳墠璁惧涓嶆敮鎸乀ouchID楠岃瘉,璇疯緭鍏ュ瘑鐮佹潵楠岃瘉"); +// goToVerifyPasswordAction?.Invoke(); +// } +// else if (e == TouchIDUtils.TouchIDState.Success) +// { +// MainPage.Log("KK:TouchID楠岃瘉鎴愬姛"); +// successAction?.Invoke(); +// } +// else if (e == TouchIDUtils.TouchIDState.InputPassword || e == TouchIDUtils.TouchIDState.TouchIDLockout) +// { +// MainPage.Log("KK:鐢ㄦ埛閫夋嫨鎵嬪姩杈撳叆瀵嗙爜"); +// goToVerifyPasswordAction?.Invoke(); +// } - }; - } +// }; +// } - /// <summary> - /// 鎸囩汗ID寮�鍚拰鍏抽棴 5:鎸囩汗ID寮�鍏� - /// </summary> - void TouchIDVerification_SwtichOnOff() - { - //鎸囩汗鍏抽棴鎴愬姛浜嬩欢 鎴愬姛浜嬩欢 - Action successAction = () => - { - var result = btnFingerprintUnlockSwtichIcon.IsSelected = !btnFingerprintUnlockSwtichIcon.IsSelected; - if (result) - { - if (!UserInfo.Current.appUnlockType.Contains("3")) - { - UserInfo.Current.appUnlockType.Add("3"); - UserInfo.Current.SaveUserInfo(); - } - } - else - { - if (UserInfo.Current.appUnlockType.Contains("3")) - { - UserInfo.Current.appUnlockType.Remove("3"); - UserInfo.Current.SaveUserInfo(); - } - } - }; +// /// <summary> +// /// 鎸囩汗ID寮�鍚拰鍏抽棴 5:鎸囩汗ID寮�鍏� +// /// </summary> +// void TouchIDVerification_SwtichOnOff() +// { +// //鎸囩汗鍏抽棴鎴愬姛浜嬩欢 鎴愬姛浜嬩欢 +// Action successAction = () => +// { +// var result = btnFingerprintUnlockSwtichIcon.IsSelected = !btnFingerprintUnlockSwtichIcon.IsSelected; +// if (result) +// { +// if (!UserInfo.Current.appUnlockType.Contains("3")) +// { +// UserInfo.Current.appUnlockType.Add("3"); +// UserInfo.Current.SaveUserInfo(); +// } +// } +// else +// { +// if (UserInfo.Current.appUnlockType.Contains("3")) +// { +// UserInfo.Current.appUnlockType.Remove("3"); +// UserInfo.Current.SaveUserInfo(); +// } +// } +// }; - //5:鎸囩汗ID寮�鍏� - string optionType = "5"; - //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� - Action goToVerifyPasswordAction = () => - { - //5:鎸囩汗ID寮�鍏� - GotogoToVerifyPasswordPage(optionType, successAction); - }; +// //5:鎸囩汗ID寮�鍏� +// string optionType = "5"; +// //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� +// Action goToVerifyPasswordAction = () => +// { +// //5:鎸囩汗ID寮�鍏� +// GotogoToVerifyPasswordPage(optionType, successAction); +// }; - TouchIDVerification_Show(successAction, goToVerifyPasswordAction); - } +// TouchIDVerification_Show(successAction, goToVerifyPasswordAction); +// } - /// <summary> - /// TouchID楠岃瘉 4:鍏抽棴瑙i攣璁剧疆 - /// </summary> - /// <param name="action">楠岃瘉鎴愬姛浜嬩欢</param> - void TouchIDVerification_TurnOffUnlock(Action successAction) - { - //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� - Action goToVerifyPasswordAction = () => - { - //4.鍏抽棴瑙i攣楠岃瘉 - GotogoToVerifyPasswordPage("4", successAction); - }; +// /// <summary> +// /// TouchID楠岃瘉 4:鍏抽棴瑙i攣璁剧疆 +// /// </summary> +// /// <param name="action">楠岃瘉鎴愬姛浜嬩欢</param> +// void TouchIDVerification_TurnOffUnlock(Action successAction) +// { +// //璺宠浆鏁板瓧瀵嗙爜鎴栬�呮墜鍔垮瘑鐮侀獙璇侀〉闈� +// Action goToVerifyPasswordAction = () => +// { +// //4.鍏抽棴瑙i攣楠岃瘉 +// GotogoToVerifyPasswordPage("4", successAction); +// }; - TouchIDVerification_Show(successAction, goToVerifyPasswordAction); - } +// TouchIDVerification_Show(successAction, goToVerifyPasswordAction); +// } - /// <summary> - /// 璺宠浆鎵嬪娍鎴栬�呭瘑鐮侀獙璇佺晫闈� - /// </summary> - /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> - /// <param name="successAction"></param> - void GotogoToVerifyPasswordPage(string optionType, Action successAction) - { - if (UserInfo.Current.appUnlockType.Contains("1")) - { - var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, successAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(optionType); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - else if (UserInfo.Current.appUnlockType.Contains("2")) - { - var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, successAction); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(optionType); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - } - } +// /// <summary> +// /// 璺宠浆鎵嬪娍鎴栬�呭瘑鐮侀獙璇佺晫闈� +// /// </summary> +// /// <param name="optionType">1:璁剧疆瀵嗙爜锛�2:楠岃瘉瀵嗙爜;3:鍏抽棴瀵嗙爜;4:鍏抽棴瑙i攣璁剧疆;5:鎸囩汗ID寮�鍏筹紱6:闈㈠ID寮�鍏�;7:瑙i攣楠岃瘉</param> +// /// <param name="successAction"></param> +// void GotogoToVerifyPasswordPage(string optionType, Action successAction) +// { +// if (UserInfo.Current.appUnlockType.Contains("1")) +// { +// var page = new AppUnlockPasswordPage(UserInfo.Current.appUnlockPasswrod, successAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(optionType); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// else if (UserInfo.Current.appUnlockType.Contains("2")) +// { +// var page = new AppUnlockGesturePage(UserInfo.Current.appUnlockPasswrod, successAction); +// MainPage.BasePageView.AddChidren(page); +// page.LoadPage(optionType); +// MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; +// } +// } - /// <summary> - /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� - /// </summary> - /// <returns></returns> - bool CheckIfUnlockPassword() - { - return UserInfo.Current.appUnlockType.Contains("1"); - } +// /// <summary> +// /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� +// /// </summary> +// /// <returns></returns> +// bool CheckIfUnlockPassword() +// { +// return UserInfo.Current.appUnlockType.Contains("1"); +// } - /// <summary> - /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� - /// </summary> - /// <returns></returns> - string GetVerificationTitleString() - { - if (CheckIfUnlockPassword()) - { - return Language.StringByID(StringId.PasswordVerification); - } - else - { - return Language.StringByID(StringId.GestureVerification); - } - } - } -} \ No newline at end of file +// /// <summary> +// /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� +// /// </summary> +// /// <returns></returns> +// string GetVerificationTitleString() +// { +// if (CheckIfUnlockPassword()) +// { +// return Language.StringByID(StringId.PasswordVerification); +// } +// else +// { +// return Language.StringByID(StringId.GestureVerification); +// } +// } +// } +//} \ No newline at end of file diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs index 1a66ef0..8a086c3 100644 --- a/SiriIntents/Server/HttpUtil.cs +++ b/SiriIntents/Server/HttpUtil.cs @@ -16,13 +16,13 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - const string APP_KEY = "HDL-HOME-APP"; - const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; + //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //const string APP_KEY = "HDL-HOME-APP"; + //const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; - //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; - //public const string APP_KEY = "HDL-HOME-APP-TEST"; - //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; + public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; + public const string APP_KEY = "HDL-HOME-APP-TEST"; + public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm //const string APP_KEY = "CPEVRLRT"; -- Gitblit v1.8.0