From f500e14c0a994487070380c50c85e0929cbc8e63 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 05 一月 2021 10:48:04 +0800
Subject: [PATCH] 2021-01-05 1.更新

---
 Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs |   46 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs b/Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs
index 7ae382a..1d6fc81 100644
--- a/Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs
+++ b/Crabtree/SmartHome/HDL/Operation/CommonUtlis.cs
@@ -44,7 +44,10 @@
         /// 鐢ㄤ簬瀵嗙爜寮哄害姝e垯琛ㄨ揪寮�
         /// 瀵嗙爜蹇呴』涓�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>
@@ -142,7 +145,46 @@
 
         #endregion
 
+        /// <summary>
+        /// 妫�娴媔OS鏄惁瓒婄嫳鍜孉ndroid鏄惁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.HDLUtils.ISJailBreak ()) {
+
+                Alert alert = new Alert ("", mes, Language.StringByID (SimpleControl.R.MyInternationalizationString.Confrim));
+                alert.ResultEventHandler += (sender2, e2) => {
+                    Shared.HDLUtils.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 ();
+        }
+
+
     }
 }

--
Gitblit v1.8.0