From 28d269d8aa90eca5470fff825a9b9545135a3ec0 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 16 十二月 2020 17:37:26 +0800
Subject: [PATCH] 上传一个初始版本

---
 HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs |  197 ++++++++++++++++++++++++-------------------------
 1 files changed, 97 insertions(+), 100 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
index 0ef85c1..496648d 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
@@ -32,10 +32,8 @@
                 {
                     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
+                    btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = false;
+                    btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false;
 
                     btnTipMsg.TextID = StringId.UnprotectedTipMsg;
 
@@ -133,93 +131,94 @@
             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;
+            EventHandler<MouseEventArgs> eventHandler3 = (sender, e) =>
+            {
+                bool result = !btnSecurityBg.IsSelected;
+                if (!result)
+                {
+                    //濡傛灉鍙墿甯冮槻/鎾ら槻涓�绉� 涓嶈兘鍙栨秷甯冮槻/鎾ら槻
+                    if (!CheckIfCanDeselect("2")) return;
+                }
 
-            //EventHandler<MouseEventArgs> eventHandler4 = (sender, e) =>
-            //{
-            //    bool result = !btnDoorlockBg.IsSelected;
-            //    if (!result)
-            //    {
-            //        //濡傛灉鍙墿杩滅▼寮�閿佷笉鑳藉彇娑堣繙绋嬪紑閿�
-            //        if (!CheckIfCanDeselect("3")) return;
-            //    }
+                btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = result;
 
-            //    btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = result;
+                btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg);
 
-            //    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
+                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;
+                }
+
+                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;
         }
 
         /// <summary>
@@ -238,18 +237,16 @@
                     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
+                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);
+                }
             }
         }
 

--
Gitblit v1.8.0