wxr
2020-12-17 1a13c963a5fb8cad92bf03667e411f46d6a6a843
HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs
@@ -32,8 +32,10 @@
                {
                    btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true;
                    btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = false;
                    btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = false;
                    btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false;
                    #region F3阶段
                    //btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = false;
                    //btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false;
                    #endregion
                    btnTipMsg.TextID = StringId.UnprotectedTipMsg;
@@ -131,94 +133,93 @@
            btnStartupSelectionIcon.MouseUpEventHandler = eventHandler2;
            btnStartupSelectionTip.MouseUpEventHandler = eventHandler2;
            EventHandler<MouseEventArgs> eventHandler3 = (sender, e) =>
            {
                bool result = !btnSecurityBg.IsSelected;
                if (!result)
                {
                    //如果只剩布防/撤防一种 不能取消布防/撤防
                    if (!CheckIfCanDeselect("2")) return;
                }
            #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;
                btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = result;
            //EventHandler<MouseEventArgs> eventHandler4 = (sender, e) =>
            //{
            //    bool result = !btnDoorlockBg.IsSelected;
            //    if (!result)
            //    {
            //        //如果只剩远程开锁不能取消远程开锁
            //        if (!CheckIfCanDeselect("3")) return;
            //    }
                btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg);
            //    btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = result;
                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;
            //    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>
@@ -237,16 +238,18 @@
                    btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = true;
                    btnTipMsg.Text = Language.StringByID(StringId.AtStartupTipMsg);
                }
                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);
                }
                #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
            }
        }