| | |
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 白色背景框
|
| | | /// 主菜单背景框
|
| | | /// </summary>
|
| | | private FrameLayout frameWhiteBack = null;
|
| | | private NormalFrameLayout frameMainMenuBack = null;
|
| | | /// <summary>
|
| | | /// 其他菜单的容器控件
|
| | | /// </summary>
|
| | | private FrameListControl frameOtherMenuContr = null;
|
| | | /// <summary>
|
| | | /// 用户名字
|
| | | /// </summary>
|
| | |
| | | /// <summary>
|
| | | /// 用户头像
|
| | | /// </summary>
|
| | | private IconViewControl btnUserIcon = null;
|
| | | private ImageView btnUserIcon = null;
|
| | | /// <summary>
|
| | | /// 皇冠
|
| | | /// </summary>
|
| | | private IconViewControl btnImperialCrown = null;
|
| | | /// <summary>
|
| | | /// 信息提示控件
|
| | | /// </summary>
|
| | | private MessageManagementControl msgControl = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | /// </summary>
|
| | | public void ShowForm()
|
| | | {
|
| | | this.FormID = "UserMainForm";
|
| | |
|
| | | //特殊处理:恢复可关闭进度条,别问为什么,我也不知道为什么,以防万一而已
|
| | | ProgressBar.SetCloseBarFlag(false);
|
| | | //初始化框架
|
| | | this.InitForm();
|
| | | //初始化头部控件
|
| | | this.InitTopFrameLayout();
|
| | | //初始化中部控件
|
| | | this.InitBodyFrameLayout();
|
| | | //移除返回键
|
| | | base.RemoveBackButton();
|
| | |
|
| | | //body占完整个屏幕,除了底部菜单
|
| | | bodyFrameLayout.Y = 0;
|
| | | bodyFrameLayout.Height = ControlCommonResourse.TopMenuFrameHeight + ControlCommonResourse.TopFrameHeight
|
| | | + ControlCommonResourse.BodyFrameHeight - ControlCommonResourse.BottomFrameHeight;
|
| | | bodyFrameLayout.Height = this.Height;
|
| | | bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BlackBackGround;
|
| | |
|
| | | //初始化中部控件
|
| | |
| | | this.ClearBodyFrame();
|
| | |
|
| | | //个人中心
|
| | | var btnTitle = new NormalViewControl(350, 100, true);
|
| | | btnTitle.X = ControlCommonResourse.XXLeft;
|
| | | var btnTitle = new NormalViewControl(450, 100, true);
|
| | | btnTitle.X = HdlControlResourse.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.GetMinRealAverage(12);
|
| | | 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);
|
| | |
| | | private void InitUserInfoControl(FrameLayout frameWhite)
|
| | | {
|
| | | //用户头像
|
| | | this.btnUserIcon = new IconViewControl(280);
|
| | | 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);
|
| | | btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
|
| | | if (Common.Config.Instance.Home.IsVirtually == false)
|
| | | {
|
| | | btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(HdlFileNameResourse.UserHeadIconFile);
|
| | | }
|
| | | 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, () =>
|
| | | {
|
| | | //退出账号
|
| | | HdlAccountLogic.Current.ReLoginAgain(Common.Config.Instance.Account);
|
| | | });
|
| | | return;
|
| | | }
|
| | | var form = new UserInformationForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1)
|
| | | //皇冠
|
| | | this.btnImperialCrown = new IconViewControl(60);
|
| | | btnImperialCrown.X = Application.GetRealWidth(346);
|
| | | btnImperialCrown.Y = Application.GetRealHeight(475);
|
| | | btnImperialCrown.UnSelectedImagePath = "Center/ImperialCrown.png";
|
| | | bodyFrameLayout.AddChidren(btnImperialCrown);
|
| | | if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1)
|
| | | {
|
| | | //皇冠
|
| | | this.btnImperialCrown = new IconViewControl(60);
|
| | | btnImperialCrown.X = Application.GetRealWidth(346);
|
| | | btnImperialCrown.Y = Application.GetRealHeight(475);
|
| | | btnImperialCrown.UnSelectedImagePath = "Center/ImperialCrown.png";
|
| | | bodyFrameLayout.AddChidren(btnImperialCrown);
|
| | | 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)
|
| | | if (HdlUserCenterResourse.UserInfo != null)
|
| | | {
|
| | | btnUserName.Text = UserCenterResourse.UserInfo.UserName;
|
| | | btnUserName.Text = HdlUserCenterResourse.UserInfo.NickName;
|
| | | }
|
| | | frameWhite.AddChidren(btnUserName);
|
| | |
|
| | |
| | | this.btnAuthority = new NormalViewControl(605, 60, true);
|
| | | btnAuthority.X = btnUserName.X;
|
| | | btnAuthority.Y = btnUserName.Bottom;
|
| | | btnAuthority.TextColor = UserCenterColor.Current.Gray;
|
| | | btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor3;
|
| | | btnAuthority.TextSize = 12;
|
| | | if (UserCenterResourse.UserInfo != null)
|
| | | {
|
| | | btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
|
| | | }
|
| | | btnAuthority.Text = HdlUserCenterResourse.ResidenceOption.AuthorityText;
|
| | | frameWhite.AddChidren(btnAuthority);
|
| | | }
|
| | |
|
| | |
| | | /// <param name="frameWhite">背景</param>
|
| | | private void InitMainMenuInfoControl(FrameLayout frameWhite)
|
| | | {
|
| | | if (frameWhiteBack != null)
|
| | | if (frameMainMenuBack != null)
|
| | | {
|
| | | frameWhiteBack.RemoveAll();
|
| | | frameMainMenuBack.RemoveAll();
|
| | | }
|
| | | else
|
| | | {
|
| | | //背景框
|
| | | frameWhiteBack = new FrameLayout();
|
| | | frameWhiteBack.Y = Application.GetRealHeight(288);
|
| | | frameWhiteBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameWhiteBack.Height = Application.GetRealHeight(371);
|
| | | frameWhiteBack.Width = frameWhite.Width - Application.GetRealWidth(29 * 2);
|
| | | frameWhiteBack.Radius = (uint)Application.GetMinRealAverage(10);
|
| | | frameWhiteBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameWhite.AddChidren(frameWhiteBack);
|
| | | 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);
|
| | | }
|
| | |
|
| | | //标题:管理
|
| | |
| | | frameTitle.Width = Application.GetRealWidth(907);
|
| | | frameTitle.Height = Application.GetRealHeight(121);
|
| | | frameTitle.Gravity = Gravity.CenterHorizontal;
|
| | | frameWhiteBack.AddChidren(frameTitle);
|
| | | frameMainMenuBack.AddChidren(frameTitle);
|
| | | var btnTitle = new NormalViewControl(500, 60, true);
|
| | | btnTitle.Gravity = Gravity.CenterVertical;
|
| | | btnTitle.TextID = R.MyInternationalizationString.uManagement;
|
| | |
| | | frameTitle.AddChidren(btnLine);
|
| | |
|
| | | //创建全部的主菜单控件
|
| | | this.CreatAllMainMenuControl(frameWhiteBack);
|
| | | this.CreatAllMainMenuControl(frameMainMenuBack);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | //成员管理
|
| | | string unSelectPic = "Center/MenberManagement.png";
|
| | | int TextID = R.MyInternationalizationString.uMember;
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
|
| | | if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 1 || HdlUserCenterResourse.ResidenceOption.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)
|
| | | if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 1 || HdlUserCenterResourse.ResidenceOption.AuthorityNo == 2)
|
| | | {
|
| | | //生成控件
|
| | | var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
|
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
|
| | | if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false)
|
| | | //拥有网关,或者是虚拟住宅,则进入设备列表界面
|
| | | if (string.IsNullOrEmpty(HdlGatewayResourse.AppOldSelectGatewayId) == false
|
| | | || Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | var form = new Device.DeviceListMainForm();
|
| | | form.AddForm();
|
| | | }
|
| | | else
|
| | | {
|
| | | //没有网关,则进入网关列表界面
|
| | | var form = new GatewayManage.GatewayListForm();
|
| | | form.AddForm();
|
| | | }
|
| | |
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //住宅接口不需要特殊的登陆Token
|
| | | var form = new Residence.ResidenceListForm();
|
| | | var form = new Residence.ResidenceListMainForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
| | | 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();
|
| | | };
|
| | |
| | | /// <param name="frameWhite">背景</param>
|
| | | private void InitOtherMenuControl(FrameLayout frameWhite)
|
| | | {
|
| | | var frameList = new FrameListControl(26);
|
| | | frameList.Y = Application.GetRealHeight(698);
|
| | | frameList.Height = ControlCommonResourse.ListViewRowHeight * 3 + Application.GetRealHeight(26 * 3);
|
| | | frameWhite.AddChidren(frameList);
|
| | | if (this.frameOtherMenuContr != null)
|
| | | {
|
| | | frameOtherMenuContr.RemoveAll();
|
| | | }
|
| | | else
|
| | | {
|
| | | frameOtherMenuContr = new FrameListControl(26);
|
| | | frameOtherMenuContr.Y = Application.GetRealHeight(698);
|
| | | frameOtherMenuContr.Height = HdlControlResourse.ListViewRowHeight * 4 + Application.GetRealHeight(26 * 4);
|
| | | frameWhite.AddChidren(frameOtherMenuContr);
|
| | | }
|
| | |
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
|
| | | if (HdlUserCenterResourse.ResidenceOption.AuthorityNo == 1 || HdlUserCenterResourse.ResidenceOption.AuthorityNo == 2)
|
| | | {
|
| | | //数据备份
|
| | | var rowback = new FrameRowControl(frameList.rowSpace / 2);
|
| | | frameList.AddChidren(rowback);
|
| | | var rowback = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
|
| | | frameOtherMenuContr.AddChidren(rowback);
|
| | | //向右图标
|
| | | var btnBackRight = rowback.AddRightArrow();
|
| | | btnBackRight.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnBackRight.X -= HdlControlResourse.XXLeft / 2;
|
| | | //图标
|
| | | var btnBackIcon = rowback.AddLeftIcon();
|
| | | btnBackIcon.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnBackIcon.X -= HdlControlResourse.XXLeft / 2;
|
| | | btnBackIcon.UnSelectedImagePath = "Center/Backup.png";
|
| | | //底线
|
| | | var btnBackLine = rowback.AddBottomLine();
|
| | | btnBackLine.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnBackLine.X -= HdlControlResourse.XXLeft / 2;
|
| | | //数据备份View
|
| | | var btnBackView = rowback.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uDataBackup), 300);
|
| | | btnBackView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnBackView.X -= HdlControlResourse.XXLeft / 2;
|
| | | rowback.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new HdlBackup.HdlBackupMenuForm();
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new HdlBackup.HdlBackupListForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
|
| | | //意见反馈
|
| | | var rowSuggestion = new FrameRowControl(frameList.rowSpace / 2);
|
| | | frameList.AddChidren(rowSuggestion);
|
| | | var rowSuggestion = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
|
| | | frameOtherMenuContr.AddChidren(rowSuggestion);
|
| | | //向右图标
|
| | | var btnSuRight = rowSuggestion.AddRightArrow();
|
| | | btnSuRight.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnSuRight.X -= HdlControlResourse.XXLeft / 2;
|
| | | //图标
|
| | | var btnSuggestionIcon = rowSuggestion.AddLeftIcon();
|
| | | btnSuggestionIcon.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnSuggestionIcon.X -= HdlControlResourse.XXLeft / 2;
|
| | | btnSuggestionIcon.UnSelectedImagePath = "Center/Opinion.png";
|
| | | //底线
|
| | | var btnSuLine = rowSuggestion.AddBottomLine();
|
| | | btnSuLine.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnSuLine.X -= HdlControlResourse.XXLeft / 2;
|
| | | //意见反馈View
|
| | | var btnSuView = rowSuggestion.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.Suggestions), 300);
|
| | | btnSuView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnSuView.X -= HdlControlResourse.XXLeft / 2;
|
| | | rowSuggestion.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new DeviceDoorLock.DoorLockHistoryLogForm();
|
| | | form.AddForm("天下第一");
|
| | | var form = new Suggestion.FeedbackForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
|
| | | //关于我们
|
| | | var rowAbount = new FrameRowControl(frameList.rowSpace / 2);
|
| | | frameList.AddChidren(rowAbount);
|
| | | var rowAbount = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
|
| | | frameOtherMenuContr.AddChidren(rowAbount);
|
| | | //向右图标
|
| | | var btnAbountRight = rowAbount.AddRightArrow();
|
| | | btnAbountRight.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnAbountRight.X -= HdlControlResourse.XXLeft / 2;
|
| | | //图标
|
| | | var btnAbountIcon = rowAbount.AddLeftIcon();
|
| | | btnAbountIcon.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnAbountIcon.X -= HdlControlResourse.XXLeft / 2;
|
| | | btnAbountIcon.UnSelectedImagePath = "Center/Abount.png";
|
| | | //底线
|
| | | var btnAbountLine = rowAbount.AddBottomLine();
|
| | | btnAbountLine.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnAbountLine.X -= HdlControlResourse.XXLeft / 2;
|
| | | //关于我们View
|
| | | var btnAbountView = rowAbount.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uAboutMe), 300);
|
| | | btnAbountView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | btnAbountView.X -= HdlControlResourse.XXLeft / 2;
|
| | | rowAbount.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | return;
|
| | | }
|
| | | var form = new Abount.AbountForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
|
| | | if (HdlUserCenterResourse.HideOption.CenterHideMenu == 1)
|
| | | {
|
| | | //隐匿菜单
|
| | | var rowHide = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
|
| | | frameOtherMenuContr.AddChidren(rowHide);
|
| | | //向右图标
|
| | | var btnHideRight = rowHide.AddRightArrow();
|
| | | btnHideRight.X -= HdlControlResourse.XXLeft / 2;
|
| | | //图标
|
| | | var btnHideIcon = rowHide.AddLeftIcon();
|
| | | btnHideIcon.X -= HdlControlResourse.XXLeft / 2;
|
| | | btnHideIcon.UnSelectedImagePath = "Center/Abount.png";
|
| | | //底线
|
| | | var btnHideLine = rowHide.AddBottomLine();
|
| | | btnHideLine.X -= HdlControlResourse.XXLeft / 2;
|
| | | //隐匿菜单View
|
| | | var btnHideView = rowHide.AddLeftCaption("调试菜单", 300);
|
| | | btnHideView.X -= HdlControlResourse.XXLeft / 2;
|
| | | rowHide.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var from = new HideOption.HideOptionMainForm();
|
| | | from.AddForm();
|
| | | };
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// </summary>
|
| | | public override int FormActionAgainEvent()
|
| | | {
|
| | | //用户头像
|
| | | if (btnUserIcon.UnSelectedImagePath != UserCenterResourse.UserInfo.UserIconFile)
|
| | | //虚拟住宅不需要刷新
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
|
| | | return -1;
|
| | | }
|
| | | //用户头像
|
| | | if (HdlUserCenterResourse.UserInfo.UserIconFileChanged == true)
|
| | | {
|
| | | HdlUserCenterResourse.UserInfo.UserIconFileChanged = false;
|
| | | btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(HdlFileNameResourse.UserHeadIconFile);
|
| | | }
|
| | | //用户名字
|
| | | btnUserName.Text = UserCenterResourse.UserInfo.UserName;
|
| | | if (UserCenterResourse.UserInfo != null)
|
| | | btnUserName.Text = HdlUserCenterResourse.UserInfo.NickName;
|
| | | //用户身份
|
| | | btnAuthority.Text = HdlUserCenterResourse.ResidenceOption.AuthorityText;
|
| | | //皇冠
|
| | | if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1)
|
| | | {
|
| | | //用户身份
|
| | | btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
|
| | | this.btnImperialCrown.Visible = false;
|
| | | }
|
| | | if (this.btnImperialCrown != null)
|
| | | else
|
| | | {
|
| | | //皇冠
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1)
|
| | | {
|
| | | this.btnImperialCrown.Visible = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | this.btnImperialCrown.Visible = true;
|
| | | }
|
| | | this.btnImperialCrown.Visible = true;
|
| | | }
|
| | |
|
| | | //刷新信息提示控件
|
| | | this.msgControl?.RefreshStatu();
|
| | |
|
| | | //初始化主菜单的控件
|
| | | this.InitMainMenuInfoControl(frameWhiteBack);
|
| | | this.InitMainMenuInfoControl(null);
|
| | | //初始化其他菜单的控件
|
| | | this.InitOtherMenuControl(null);
|
| | |
|
| | | return 1;
|
| | | }
|