| | |
| | | /// 用于密码强度正则表达式 |
| | | /// 密码必须为8-20个字符,包含字母、数字和符号 |
| | | /// </summary> |
| | | public static string PasswordRegexStr = "^(?![0-9]+$)(?![a-zA-Z]+$)(?![0-9a-zA-Z]+$)(?![0-9\\W]+$)(?![a-zA-Z\\W]+$)[0-9A-Za-z\\W]{8,20}$"; |
| | | //public static string PasswordRegexStr = "^(?![0-9]+$)(?![a-zA-Z]+$)(?![0-9a-zA-Z]+$)(?![0-9\\W]+$)(?![a-zA-Z\\W]+$)[0-9A-Za-z\\W]{8,20}$"; |
| | | public static string PasswordRegexStr = @"^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[^\w\s]).{8,20}$";//必须包含一个大写,一个小写字母,一个数字,一个特殊字符,且长度为8到20位 |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 检测iOS是否越狱和Android是否root |
| | | /// </summary> |
| | | public void CheckIfJailBreak () |
| | | { |
| | | |
| | | |
| | | #if __IOS__ |
| | | var mes = "Your phone has been Jailbroken and you cannot use the APP."; |
| | | #else |
| | | var mes = "Your phone has been ROOT and you cannot use the APP."; |
| | | #endif |
| | | |
| | | if (Shared.JailBreak.JailBreak.ISJailBreak ()) { |
| | | |
| | | Alert alert = new Alert ("", mes, Language.StringByID (SimpleControl.R.MyInternationalizationString.Confrim)); |
| | | alert.ResultEventHandler += (sender2, e2) => { |
| | | Shared.JailBreak.JailBreak.ExitApplication (); |
| | | }; |
| | | alert.Show (); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 弹窗提示 |
| | | /// </summary> |
| | | /// <param name="mes">弹窗提示信息</param> |
| | | /// <param name="okAction">确认按钮事件</param> |
| | | public void ShowActionAlert (string mes, Action okAction) |
| | | { |
| | | Alert alert = new Alert ("", mes, Language.StringByID (SimpleControl.R.MyInternationalizationString.Cancel), Language.StringByID (SimpleControl.R.MyInternationalizationString.Confrim)); |
| | | alert.ResultEventHandler += (sender2, e2) => { |
| | | if (e2) { |
| | | okAction?.Invoke (); |
| | | } |
| | | }; |
| | | alert.Show (); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |