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/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockGesturePage.cs | 850 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 425 insertions(+), 425 deletions(-) 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 -- Gitblit v1.8.0