黄学彪
2020-04-28 e22fdb94322e6cec38e5e4a9aec13d431a133fde
ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -132,18 +132,31 @@
        {
            //用户头像
            this.btnUserIcon = new ImageView();
            btnUserIcon.Height = Application.GetMinRealAverage(280);
            btnUserIcon.Width = Application.GetMinRealAverage(280);
            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(280) / 2;
            btnUserIcon.Height = this.GetPictrueRealSize(280);
            btnUserIcon.Width = this.GetPictrueRealSize(280);
            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(280) / 2;
            btnUserIcon.X = Application.GetRealWidth(121);
            btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
            if (Common.Config.Instance.Home.IsVirtually == false)
            {
                btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
            }
            else
            {
                btnUserIcon.ImagePath = "Account/Cat.png";
            }
            bodyFrameLayout.AddChidren(btnUserIcon);
            btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
            btnUserIcon.MouseUpEventHandler += (sender, e) =>
            {
                if (Common.Config.Instance.Home.IsVirtually == true)
                {
                    //如果改住宅为虚拟住宅,则此功能无效
                    //如果住宅为虚拟住宅,则直接提示:确定退出当前账号?
                    string msg = Language.StringByID(R.MyInternationalizationString.uLogoutAccountMsg);
                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                    {
                        //退出账号
                        UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
                    });
                    return;
                }
                var form = new UserInformationForm();
@@ -254,7 +267,7 @@
                {
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        //如果改住宅为虚拟住宅,则此功能无效
                        //如果住宅为虚拟住宅,则此功能无效
                        return;
                    }
                    var form = new Member.MemberListForm();
@@ -272,13 +285,16 @@
                frame.ButtonClickEvent += (sender, e) =>
                {
                    HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
                    if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false)
                    //拥有网关,或者是虚拟住宅,则进入设备列表界面
                    if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false
                    || Common.Config.Instance.Home.IsVirtually == true)
                    {
                        var form = new Device.DeviceListMainForm();
                        form.AddForm();
                    }
                    else
                    {
                        //没有网关,则进入网关列表界面
                        var form = new GatewayManage.GatewayListForm();
                        form.AddForm();
                    }
@@ -312,7 +328,7 @@
                {
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        //如果改住宅为虚拟住宅,则此功能无效
                        //如果住宅为虚拟住宅,则此功能无效
                        return;
                    }
                    var form = new Safety.SafetyManagementMainForm();
@@ -405,7 +421,7 @@
                {
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        //如果改住宅为虚拟住宅,则此功能无效
                        //如果住宅为虚拟住宅,则此功能无效
                        return;
                    }
                    var form = new HdlBackup.HdlBackupListForm();
@@ -455,7 +471,7 @@
            {
                if (Common.Config.Instance.Home.IsVirtually == true)
                {
                    //如果改住宅为虚拟住宅,则此功能无效
                    //如果住宅为虚拟住宅,则此功能无效
                    return;
                }
                var form = new Abount.AbountForm();
@@ -497,6 +513,11 @@
        /// </summary>
        public override int FormActionAgainEvent()
        {
            //虚拟住宅不需要刷新
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return -1;
            }
            //用户头像
            if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
            {