New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Shared.Phone.UserCenter.UserMain
|
| | | {
|
| | | /// <summary>
|
| | | /// 个人中心主画面
|
| | | /// </summary>
|
| | | public class UserMainForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 主菜单背景框
|
| | | /// </summary>
|
| | | private NormalFrameLayout frameMainMenuBack = null;
|
| | | /// <summary>
|
| | | /// 其他菜单的容器控件
|
| | | /// </summary>
|
| | | private FrameListControl frameOtherMenuContr = null;
|
| | | /// <summary>
|
| | | /// 用户名字
|
| | | /// </summary>
|
| | | private NormalViewControl btnUserName = null;
|
| | | /// <summary>
|
| | | /// 用户身份
|
| | | /// </summary>
|
| | | private NormalViewControl btnAuthority = null;
|
| | | /// <summary>
|
| | | /// 用户头像
|
| | | /// </summary>
|
| | | private ImageView btnUserIcon = null;
|
| | | /// <summary>
|
| | | /// 皇冠
|
| | | /// </summary>
|
| | | private IconViewControl btnImperialCrown = null;
|
| | | /// <summary>
|
| | | /// 信息提示控件
|
| | | /// </summary>
|
| | | private MessageManagementControl msgControl = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建),
|
| | | /// 注意:因为外面的框架问题,在外面不能使用底层的方法
|
| | | /// 不然,可能会有些共通参数出错
|
| | | /// </summary>
|
| | | public void ShowForm()
|
| | | {
|
| | | this.FormID = "UserMainForm";
|
| | |
|
| | | //特殊处理:恢复可关闭进度条,别问为什么,我也不知道为什么,以防万一而已
|
| | | ProgressBar.SetCloseBarFlag(false);
|
| | | //初始化头部控件
|
| | | this.InitTopFrameLayout();
|
| | | //初始化中部控件
|
| | | this.InitBodyFrameLayout();
|
| | | //移除返回键
|
| | | base.RemoveBackButton();
|
| | |
|
| | | //body占完整个屏幕,除了底部菜单
|
| | | bodyFrameLayout.Y = 0;
|
| | | bodyFrameLayout.Height = this.Height;
|
| | | bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BlackBackGround;
|
| | |
|
| | | //初始化中部控件
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部控件
|
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //个人中心
|
| | | var btnTitle = new NormalViewControl(350, 100, true);
|
| | | btnTitle.X = ControlCommonResourse.XXLeft;
|
| | | btnTitle.Y = Application.GetRealHeight(112);
|
| | | btnTitle.TextColor = UserCenterColor.Current.White;
|
| | | btnTitle.TextSize = 24;
|
| | | btnTitle.IsBold = true;
|
| | | btnTitle.TextID = R.MyInternationalizationString.UserCenter;
|
| | | bodyFrameLayout.AddChidren(btnTitle);
|
| | |
|
| | | var btnBack1 = new PicViewControl(1031, 942);
|
| | | btnBack1.Y = btnTitle.Bottom - Application.GetRealHeight(10);
|
| | | btnBack1.UnSelectedImagePath = "Center/MainBack1.png";
|
| | | bodyFrameLayout.AddChidren(btnBack1);
|
| | | var btnBack2 = new PicViewControl(392, 172);
|
| | | btnBack2.X = Application.GetRealWidth(688);
|
| | | btnBack2.UnSelectedImagePath = "Center/MainBack2.png";
|
| | | bodyFrameLayout.AddChidren(btnBack2);
|
| | |
|
| | | //信息提示控件
|
| | | this.msgControl = new MessageManagementControl();
|
| | | msgControl.Y = Application.GetRealHeight(127);
|
| | | msgControl.X = Application.GetRealWidth(953);
|
| | | bodyFrameLayout.AddChidren(this.msgControl);
|
| | |
|
| | | //白框
|
| | | var frameBack = new FrameLayout();
|
| | | frameBack.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
|
| | | frameBack.Y = Application.GetRealHeight(380);
|
| | | frameBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameBack.Radius = (uint)Application.GetRealHeight(29);
|
| | | frameBack.Width = bodyFrameLayout.Width - Application.GetRealWidth(29 * 2);
|
| | | frameBack.Height = bodyFrameLayout.Height - Application.GetRealHeight(380) + Application.GetRealHeight(100);
|
| | | bodyFrameLayout.AddChidren(frameBack);
|
| | |
|
| | | //初始化个人信息的控件
|
| | | this.InitUserInfoControl(frameBack);
|
| | |
|
| | | //初始化主菜单的控件
|
| | | this.InitMainMenuInfoControl(frameBack);
|
| | |
|
| | | //初始化其他菜单
|
| | | this.InitOtherMenuControl(frameBack);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 个人信息的控件_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化个人信息的控件
|
| | | /// </summary>
|
| | | /// <param name="frameWhite">背景</param>
|
| | | private void InitUserInfoControl(FrameLayout frameWhite)
|
| | | {
|
| | | //用户头像
|
| | | this.btnUserIcon = new ImageView();
|
| | | btnUserIcon.Height = this.GetPictrueRealSize(280);
|
| | | btnUserIcon.Width = this.GetPictrueRealSize(280);
|
| | | btnUserIcon.Radius = (uint)this.GetPictrueRealSize(280) / 2;
|
| | | btnUserIcon.X = Application.GetRealWidth(121);
|
| | | 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();
|
| | | form.AddForm();
|
| | | };
|
| | |
|
| | | //皇冠
|
| | | this.btnImperialCrown = new IconViewControl(60);
|
| | | btnImperialCrown.X = Application.GetRealWidth(346);
|
| | | btnImperialCrown.Y = Application.GetRealHeight(475);
|
| | | btnImperialCrown.UnSelectedImagePath = "Center/ImperialCrown.png";
|
| | | bodyFrameLayout.AddChidren(btnImperialCrown);
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1)
|
| | | {
|
| | | btnImperialCrown.Visible = false;
|
| | | }
|
| | |
|
| | | //用户昵称
|
| | | this.btnUserName = new NormalViewControl(605, 60, true);
|
| | | btnUserName.IsBold = true;
|
| | | btnUserName.X = btnUserIcon.Right + Application.GetRealWidth(5);
|
| | | btnUserName.Y = Application.GetRealHeight(43);
|
| | | if (UserCenterResourse.UserInfo != null)
|
| | | {
|
| | | btnUserName.Text = UserCenterResourse.UserInfo.UserName;
|
| | | }
|
| | | frameWhite.AddChidren(btnUserName);
|
| | |
|
| | | //用户身份
|
| | | this.btnAuthority = new NormalViewControl(605, 60, true);
|
| | | btnAuthority.X = btnUserName.X;
|
| | | btnAuthority.Y = btnUserName.Bottom;
|
| | | btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnAuthority.TextSize = 12;
|
| | | if (UserCenterResourse.UserInfo != null)
|
| | | {
|
| | | btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
|
| | | }
|
| | | frameWhite.AddChidren(btnAuthority);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 主菜单的控件_______________________
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化主菜单的控件
|
| | | /// </summary>
|
| | | /// <param name="frameWhite">背景</param>
|
| | | private void InitMainMenuInfoControl(FrameLayout frameWhite)
|
| | | {
|
| | | if (frameMainMenuBack != null)
|
| | | {
|
| | | frameMainMenuBack.RemoveAll();
|
| | | }
|
| | | else
|
| | | {
|
| | | //背景框
|
| | | frameMainMenuBack = new NormalFrameLayout();
|
| | | frameMainMenuBack.Y = Application.GetRealHeight(288);
|
| | | frameMainMenuBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameMainMenuBack.Height = Application.GetRealHeight(371);
|
| | | frameMainMenuBack.Width = frameWhite.Width - Application.GetRealWidth(29 * 2);
|
| | | frameMainMenuBack.Radius = (uint)Application.GetRealHeight(17);
|
| | | frameMainMenuBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameWhite.AddChidren(frameMainMenuBack);
|
| | | }
|
| | |
|
| | | //标题:管理
|
| | | var frameTitle = new FrameLayout();
|
| | | frameTitle.Y = Application.GetRealHeight(6);
|
| | | frameTitle.Width = Application.GetRealWidth(907);
|
| | | frameTitle.Height = Application.GetRealHeight(121);
|
| | | frameTitle.Gravity = Gravity.CenterHorizontal;
|
| | | frameMainMenuBack.AddChidren(frameTitle);
|
| | | var btnTitle = new NormalViewControl(500, 60, true);
|
| | | btnTitle.Gravity = Gravity.CenterVertical;
|
| | | btnTitle.TextID = R.MyInternationalizationString.uManagement;
|
| | | frameTitle.AddChidren(btnTitle);
|
| | | var btnLine = new NormalViewControl(frameTitle.Width, 1, false);
|
| | | btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
|
| | | btnLine.Y = frameTitle.Height - 1;
|
| | | frameTitle.AddChidren(btnLine);
|
| | |
|
| | | //创建全部的主菜单控件
|
| | | this.CreatAllMainMenuControl(frameMainMenuBack);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 创建全部的主菜单控件
|
| | | /// </summary>
|
| | | /// <param name="frameBack"></param>
|
| | | private void CreatAllMainMenuControl(FrameLayout frameBack)
|
| | | {
|
| | | var frameMenu = new FrameLayout();
|
| | | frameMenu.Y = Application.GetRealHeight(184);
|
| | | frameMenu.Height = Application.GetRealHeight(153);
|
| | | frameBack.AddChidren(frameMenu);
|
| | |
|
| | | //成员管理
|
| | | string unSelectPic = "Center/MenberManagement.png";
|
| | | int TextID = R.MyInternationalizationString.uMember;
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
|
| | | {
|
| | | //生成控件
|
| | | var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
|
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new Member.MemberListForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
|
| | | //设备管理
|
| | | unSelectPic = "Center/DeviceManagement.png";
|
| | | TextID = R.MyInternationalizationString.uDevice;
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
|
| | | {
|
| | | //生成控件
|
| | | var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
|
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
|
| | | //拥有网关,或者是虚拟住宅,则进入设备列表界面
|
| | | 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();
|
| | | }
|
| | | };
|
| | | }
|
| | |
|
| | | //住宅管理
|
| | | unSelectPic = "Center/ResidenceManagement.png";
|
| | | TextID = R.MyInternationalizationString.uResidence;
|
| | | if (1 == 1)//统一格式好看一点而已
|
| | | {
|
| | | //生成控件
|
| | | var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
|
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //住宅接口不需要特殊的登陆Token
|
| | | var form = new Residence.ResidenceListForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
|
| | | //安防管理
|
| | | unSelectPic = "Center/SafetyManagement.png";
|
| | | TextID = R.MyInternationalizationString.uSafety;
|
| | | //这个账号拥有网关的情况下,才显示这个菜单
|
| | | if (HdlGatewayLogic.Current.GetAllLocalGateway().Count > 0)
|
| | | {
|
| | | //生成控件
|
| | | var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
|
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new Safety.SafetyManagementMainForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | | //重新让它居中
|
| | | frameMenu.Gravity = Gravity.CenterHorizontal;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 创建一个主菜单控件
|
| | | /// </summary>
|
| | | /// <param name="frameBack">背景框</param>
|
| | | /// <param name="textId">显示文本</param>
|
| | | /// <param name="UnSelectPic">图片对象</param>
|
| | | /// <returns></returns>
|
| | | private FrameRowControl CreatMainMenuControl(FrameLayout frameBack, int textId, string UnSelectPic)
|
| | | {
|
| | | int width = 236;
|
| | | //外框
|
| | | var frame = new FrameRowControl();
|
| | | frame.Width = Application.GetRealWidth(width);
|
| | | frame.Height = frameBack.Height;
|
| | | frame.Gravity = Gravity.CenterVertical;
|
| | | frame.X = frameBack.ChildrenCount * Application.GetRealWidth(width);
|
| | | frameBack.AddChidren(frame);
|
| | | frame.RemoveBaseClickEvent();
|
| | | //变更大小
|
| | | frameBack.Width = frameBack.ChildrenCount * Application.GetRealWidth(width);
|
| | |
|
| | | //图标
|
| | | var btnIcon = new IconViewControl(81);
|
| | | btnIcon.Gravity = Gravity.CenterHorizontal;
|
| | | btnIcon.UnSelectedImagePath = UnSelectPic;
|
| | | frame.AddChidren(btnIcon);
|
| | |
|
| | | //文字
|
| | | var btnText = new NormalViewControl(frame.Width, Application.GetRealHeight(72), false);
|
| | | btnText.TextSize = 12;
|
| | | btnText.Y = btnIcon.Bottom;
|
| | | btnText.TextAlignment = TextAlignment.Center;
|
| | | btnText.TextID = textId;
|
| | | frame.AddChidren(btnText);
|
| | |
|
| | | return frame;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化其他菜单_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化其他菜单
|
| | | /// </summary>
|
| | | /// <param name="frameWhite">背景</param>
|
| | | private void InitOtherMenuControl(FrameLayout frameWhite)
|
| | | {
|
| | | if (this.frameOtherMenuContr != null)
|
| | | {
|
| | | frameOtherMenuContr.RemoveAll();
|
| | | }
|
| | | else
|
| | | {
|
| | | frameOtherMenuContr = new FrameListControl(26);
|
| | | frameOtherMenuContr.Y = Application.GetRealHeight(698);
|
| | | frameOtherMenuContr.Height = ControlCommonResourse.ListViewRowHeight * 4 + Application.GetRealHeight(26 * 4);
|
| | | frameWhite.AddChidren(frameOtherMenuContr);
|
| | | }
|
| | |
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
|
| | | {
|
| | | //数据备份
|
| | | var rowback = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
|
| | | frameOtherMenuContr.AddChidren(rowback);
|
| | | //向右图标
|
| | | var btnBackRight = rowback.AddRightArrow();
|
| | | btnBackRight.X -= ControlCommonResourse.XXLeft / 2;
|
| | | //图标
|
| | | var btnBackIcon = rowback.AddLeftIcon();
|
| | | btnBackIcon.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnBackIcon.UnSelectedImagePath = "Center/Backup.png";
|
| | | //底线
|
| | | var btnBackLine = rowback.AddBottomLine();
|
| | | btnBackLine.X -= ControlCommonResourse.XXLeft / 2;
|
| | | //数据备份View
|
| | | var btnBackView = rowback.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uDataBackup), 300);
|
| | | btnBackView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | rowback.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new HdlBackup.HdlBackupListForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
|
| | | //意见反馈
|
| | | var rowSuggestion = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
|
| | | frameOtherMenuContr.AddChidren(rowSuggestion);
|
| | | //向右图标
|
| | | var btnSuRight = rowSuggestion.AddRightArrow();
|
| | | btnSuRight.X -= ControlCommonResourse.XXLeft / 2;
|
| | | //图标
|
| | | var btnSuggestionIcon = rowSuggestion.AddLeftIcon();
|
| | | btnSuggestionIcon.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnSuggestionIcon.UnSelectedImagePath = "Center/Opinion.png";
|
| | | //底线
|
| | | var btnSuLine = rowSuggestion.AddBottomLine();
|
| | | btnSuLine.X -= ControlCommonResourse.XXLeft / 2;
|
| | | //意见反馈View
|
| | | var btnSuView = rowSuggestion.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.Suggestions), 300);
|
| | | btnSuView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | rowSuggestion.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new Suggestion.FeedbackForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
|
| | | //关于我们
|
| | | var rowAbount = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
|
| | | frameOtherMenuContr.AddChidren(rowAbount);
|
| | | //向右图标
|
| | | var btnAbountRight = rowAbount.AddRightArrow();
|
| | | btnAbountRight.X -= ControlCommonResourse.XXLeft / 2;
|
| | | //图标
|
| | | var btnAbountIcon = rowAbount.AddLeftIcon();
|
| | | btnAbountIcon.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnAbountIcon.UnSelectedImagePath = "Center/Abount.png";
|
| | | //底线
|
| | | var btnAbountLine = rowAbount.AddBottomLine();
|
| | | btnAbountLine.X -= ControlCommonResourse.XXLeft / 2;
|
| | | //关于我们View
|
| | | var btnAbountView = rowAbount.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uAboutMe), 300);
|
| | | btnAbountView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | rowAbount.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new Abount.AbountForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
|
| | | if (UserCenterResourse.HideOption.CenterHideMenu == 1)
|
| | | {
|
| | | //隐匿菜单
|
| | | var rowHide = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
|
| | | frameOtherMenuContr.AddChidren(rowHide);
|
| | | //向右图标
|
| | | var btnHideRight = rowHide.AddRightArrow();
|
| | | btnHideRight.X -= ControlCommonResourse.XXLeft / 2;
|
| | | //图标
|
| | | var btnHideIcon = rowHide.AddLeftIcon();
|
| | | btnHideIcon.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnHideIcon.UnSelectedImagePath = "Center/Abount.png";
|
| | | //底线
|
| | | var btnHideLine = rowHide.AddBottomLine();
|
| | | btnHideLine.X -= ControlCommonResourse.XXLeft / 2;
|
| | | //隐匿菜单View
|
| | | var btnHideView = rowHide.AddLeftCaption("隐匿菜单", 300);
|
| | | btnHideView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | rowHide.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var from = new HideOption.HideOptionMainForm();
|
| | | from.AddForm();
|
| | | };
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 界面重新激活事件___________________
|
| | |
|
| | | /// <summary>
|
| | | /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
|
| | | /// </summary>
|
| | | public override int FormActionAgainEvent()
|
| | | {
|
| | | //虚拟住宅不需要刷新
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return -1;
|
| | | }
|
| | | //用户头像
|
| | | if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
|
| | | {
|
| | | UserCenterResourse.UserInfo.UserIconFileChanged = false;
|
| | | btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
|
| | | }
|
| | | //用户名字
|
| | | btnUserName.Text = UserCenterResourse.UserInfo.UserName;
|
| | | if (UserCenterResourse.UserInfo != null)
|
| | | {
|
| | | //用户身份
|
| | | btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
|
| | | }
|
| | | //皇冠
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1)
|
| | | {
|
| | | this.btnImperialCrown.Visible = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | this.btnImperialCrown.Visible = true;
|
| | | }
|
| | |
|
| | | //刷新信息提示控件
|
| | | this.msgControl?.RefreshStatu();
|
| | |
|
| | | //初始化主菜单的控件
|
| | | this.InitMainMenuInfoControl(null);
|
| | | //初始化其他菜单的控件
|
| | | this.InitOtherMenuControl(null);
|
| | |
|
| | | return 1;
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|