| | |
| | | }; |
| | | } |
| | | |
| | | ///// <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> |
| | | /// 退出账号登录事件 |
| | | /// </summary> |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | |
| | | Action<string> callBack = (str) => |
| | | { |
| | | if (string.IsNullOrEmpty(str)) |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | ////我的二维码 |
| | | //var aep = new MyQRCodePage(); |
| | | //MainPage.BasePageView.AddChidren(aep); |
| | | //aep.LoadPage(); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | //萤石跳转视频页 |
| | | EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial("J92513662", "1638782606240137218", "security.door.ezviz"); |
| | | //我的二维码 |
| | | var aep = new MyQRCodePage(); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | _QRcodeView.MouseUpEventHandler = eventHandler; |
| | | btnQRcode.MouseUpEventHandler = eventHandler; |
| | |
| | | btnQRcodeRight.MouseUpEventHandler = eventHandler; |
| | | } |
| | | |
| | | #region 修改绑定邮箱 |
| | | #region 修改绑定邮箱 |
| | | /// <summary> |
| | | /// 修改绑定邮箱 |
| | | /// </summary> |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | //Action<string> action = (phone) => |
| | | //{ |
| | | // btnUserPhoneInfo.Text = GetBindAccountText(phone); |
| | | Action<string> action = (phone) => |
| | | { |
| | | btnUserPhoneInfo.Text = GetBindAccountText(phone); |
| | | |
| | | //}; |
| | | }; |
| | | |
| | | //if (CheckIfUnbound(btnUserPhoneInfo.Text)) |
| | | //{ |
| | | // //未绑定,跳转新绑定页面 |
| | | // var aep = new NewBindAccountPage(); |
| | | // MainPage.BasePageView.AddChidren(aep); |
| | | // aep.LoadPage(action, true); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | //} |
| | | //else |
| | | //{ |
| | | // var aep = new AccountBindInfoPage(); |
| | | // MainPage.BasePageView.AddChidren(aep); |
| | | // aep.LoadPage(action, 2, StringId.PhoneInfo); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | //} |
| | | |
| | | //萤石跳转设备列表 |
| | | NSObject[] types = new NSObject[1]; |
| | | types[0] = new NSString("DL30V"); |
| | | EZSDK.IOS.EZSDK.SharedInstance().ToEZDeviceListViewWithFilterTypes(types); |
| | | |
| | | if (CheckIfUnbound(btnUserPhoneInfo.Text)) |
| | | { |
| | | //未绑定,跳转新绑定页面 |
| | | var aep = new NewBindAccountPage(); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(action, true); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | else |
| | | { |
| | | var aep = new AccountBindInfoPage(); |
| | | MainPage.BasePageView.AddChidren(aep); |
| | | aep.LoadPage(action, 2, StringId.PhoneInfo); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | } |
| | | |
| | | }; |
| | | btnUserPhoneInfo.MouseUpEventHandler = eventHandler; |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | | { |
| | | ////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(); |
| | | //var page = new ResetPasswordOptionPage(); |
| | | //MainPage.BasePageView.AddChidren(page); |
| | | //page.LoadPage(); |
| | | //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | //萤石添加设备 |
| | | EZSDK.IOS.EZSDK.SharedInstance().AddEzvizMonitorWithDeviceType("security.door.ezviz"); |
| | | var vcp = new ResetPasswordPage(); |
| | | MainPage.BasePageView.AddChidren(vcp); |
| | | vcp.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | }; |
| | | btnResetPasswordRight.MouseUpEventHandler = eventHandler; |