mac
2024-07-25 f9181a9c8125136f597add7c30cb2ff508d54ba7
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs
@@ -4,6 +4,11 @@
using HDL_ON.Entity;
using Shared;
#if __IOS__
using UIKit;
using Foundation;
#endif
namespace HDL_ON.UI
{
    public partial class PersonalDataPage
@@ -35,111 +40,6 @@
                LoadPictureOptionView();
            };
        }
        ///// <summary>
        ///// 退出登录操作
        ///// </summary>
        //void Logout()
        //{
        //    #region 保存本地数据至文件夹
        //    string oldRegionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID.ToString());
        //    new System.Threading.Thread(() =>
        //    {
        //        try
        //        {
        //            var backuplist = FileUtils.ReadFiles();
        //            //移动文件
        //            foreach (var fileName in backuplist)
        //            {
        //                System.IO.FileInfo fileInfo = new System.IO.FileInfo(FileUtils.RootPath + fileName);
        //                if (fileInfo.Exists)
        //                {
        //                    fileInfo.MoveTo(oldRegionRootPath + fileName);
        //                    MainPage.Log("move file : " + fileName);
        //                }
        //            }
        //            FileUtils.DeleteRegionFiles(oldRegionRootPath);
        //        }
        //        catch (Exception ex)
        //        {
        //            MainPage.Log($"xxx:{ex.Message}");
        //        }
        //        finally
        //        {
        //            FileUtils.DeleteAllFile();
        //        }
        //    }).Start();
        //    #endregion
        //    //2.注销推送
        //    new HttpServerRequest().SignOutPush();
        //    //3.跳转登录页面
        //    UserInfo.Current.LastTime = DateTime.MinValue;
        //    UserInfo.Current.headImagePagePath = "LoginIcon/2.png";//重置用户头像
        //    UserInfo.Current.SaveUserInfo();
        //    MainPage.GoLoginPage(UserInfo.Current);
        //    DB_ResidenceData.residenceData.EixtAccount();
        //}
        ///// <summary>
        ///// 退出登录操作
        ///// </summary>
        //public void LogoutNew()
        //{
        //    //加载Loading效果
        //    var waitPage = new Loading();
        //    bodyView.AddChidren(waitPage);
        //    waitPage.Start(Language.StringByID(StringId.PleaseWait));
        //    new Thread(() =>
        //    {
        //        try
        //        {
        //            #region 保存本地数据至文件夹
        //            //string oldRegionRootPath = FileUtils.CreateRegionBackup(DB_ResidenceData.residenceData.CurReginID.ToString());
        //            ////清空之前的住宅文件
        //            //FileUtils.DeleteRegionFiles(oldRegionRootPath);
        //            //var backuplist = FileUtils.ReadFiles();
        //            ////移动文件
        //            //foreach (var fileName in backuplist)
        //            //{
        //            //    System.IO.FileInfo fileInfo = new System.IO.FileInfo(FileUtils.RootPath + fileName);
        //            //    if (fileInfo.Exists)
        //            //    {
        //            //        fileInfo.MoveTo(oldRegionRootPath + fileName);
        //            //        MainPage.Log("move file : " + fileName);
        //            //    }
        //            //}
        //            #endregion
        //        }
        //        catch (Exception ex)
        //        {
        //            MainPage.Log($"xxx:{ex.Message}");
        //        }
        //        finally
        //        {
        //            //FileUtils.DeleteAllFile();
        //            //2.注销推送
        //            new HttpServerRequest().SignOutPush();
        //            //3.跳转登录页面
        //            UserInfo.Current.LastTime = DateTime.MinValue;
        //            UserInfo.Current.headImagePagePath = "LoginIcon/2.png";//重置用户头像
        //            UserInfo.Current.SaveUserInfo();
        //            Shared.Application.RunOnMainThread(() =>
        //            {
        //                if (waitPage != null)
        //                {
        //                    waitPage.RemoveFromParent();
        //                    waitPage = null;
        //                }
        //                MainPage.GoLoginPage(UserInfo.Current);
        //                DB_ResidenceData.residenceData.EixtAccount();
        //            });
        //        }
        //    }).Start();
        //}
        /// <summary>
        /// 退出账号登录事件
@@ -363,6 +263,7 @@
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                Action<string> callBack = (str) =>
                {
                    if (string.IsNullOrEmpty(str))
@@ -439,7 +340,6 @@
                MainPage.BasePageView.AddChidren(aep);
                aep.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            _QRcodeView.MouseUpEventHandler = eventHandler;
            btnQRcode.MouseUpEventHandler = eventHandler;
@@ -459,6 +359,7 @@
                {
                    btnUserEmailInfo.Text = GetBindAccountText(email);
                };
                if (CheckIfUnbound(btnUserEmailInfo.Text))
@@ -493,6 +394,7 @@
                Action<string> action = (phone) =>
                {
                    btnUserPhoneInfo.Text = GetBindAccountText(phone);
                };
                if (CheckIfUnbound(btnUserPhoneInfo.Text))
@@ -511,15 +413,14 @@
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                }
            };
            btnUserPhoneInfo.MouseUpEventHandler = eventHandler;
            btnUserPhoneRight.MouseUpEventHandler = eventHandler;
            userPhoneInfoView.MouseUpEventHandler = eventHandler;
        }
        #endregion
#endregion
        #region 解锁设置区域
#region 解锁设置区域
        //void LoadEvent_SkipInterpretationSettings()
        //{
        //    EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
@@ -535,7 +436,7 @@
        //    btnInterpretationSettingsTip.MouseUpEventHandler = eventHandler;
        //}
        #endregion
#endregion
        /// <summary>
        /// 跳转修改密码界面
@@ -544,10 +445,16 @@
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var page = new ResetPasswordOptionPage();
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
                //var page = new ResetPasswordOptionPage();
                //MainPage.BasePageView.AddChidren(page);
                //page.LoadPage();
                //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                var vcp = new ResetPasswordPage();
                MainPage.BasePageView.AddChidren(vcp);
                vcp.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
            btnResetPasswordRight.MouseUpEventHandler = eventHandler;
            btnResetPasswordText.MouseUpEventHandler = eventHandler;