| | |
| | | /// 用户名字
|
| | | /// </summary>
|
| | | private NormalViewControl btnUserName = null;
|
| | | /// <summary>
|
| | | /// 用户身份
|
| | | /// </summary>
|
| | | private NormalViewControl btnAuthority = null;
|
| | | /// <summary>
|
| | | /// 用户头像
|
| | | /// </summary>
|
| | | private IconViewControl btnUserIcon = null;
|
| | | /// <summary>
|
| | | /// 皇冠
|
| | | /// </summary>
|
| | | private IconViewControl btnImperialCrown = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | private void InitUserInfoControl(FrameLayout frameWhite)
|
| | | {
|
| | | //用户头像
|
| | | var btnUserIcon = new IconViewControl(280);
|
| | | this.btnUserIcon = new IconViewControl(280);
|
| | | btnUserIcon.X = Application.GetRealWidth(121);
|
| | | btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
|
| | | bodyFrameLayout.AddChidren(btnUserIcon);
|
| | |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1)
|
| | | {
|
| | | //皇冠
|
| | | var btnImperialCrown = new IconViewControl(60);
|
| | | this.btnImperialCrown = new IconViewControl(60);
|
| | | btnImperialCrown.X = Application.GetRealWidth(346);
|
| | | btnImperialCrown.Y = Application.GetRealHeight(475);
|
| | | btnImperialCrown.UnSelectedImagePath = "Center/ImperialCrown.png";
|
| | |
| | | }
|
| | |
|
| | | //用户昵称
|
| | | btnUserName = new NormalViewControl(605, 60, true);
|
| | | this.btnUserName = new NormalViewControl(605, 60, true);
|
| | | btnUserName.X = btnUserIcon.Right + Application.GetRealWidth(5);
|
| | | btnUserName.Y = Application.GetRealHeight(43);
|
| | | if (UserCenterResourse.UserInfo != null)
|
| | |
| | | frameWhite.AddChidren(btnUserName);
|
| | |
|
| | | //用户身份
|
| | | var btnAuthority = new NormalViewControl(605, 60, true);
|
| | | this.btnAuthority = new NormalViewControl(605, 60, true);
|
| | | btnAuthority.X = btnUserName.X;
|
| | | btnAuthority.Y = btnUserName.Bottom;
|
| | | btnAuthority.TextColor = UserCenterColor.Current.Gray;
|
| | |
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //住宅接口不需要特殊的登陆Token
|
| | | var form = new Residence.ResidenceManagementForm();
|
| | | var form = new Residence.ResidenceListForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
| | | /// <summary>
|
| | | /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
|
| | | /// </summary>
|
| | | public override void FormActionAgainEvent()
|
| | | public override int FormActionAgainEvent()
|
| | | {
|
| | | //用户头像
|
| | | if (btnUserIcon.UnSelectedImagePath != UserCenterResourse.UserInfo.UserIconFile)
|
| | | {
|
| | | btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
|
| | | }
|
| | | //用户名字
|
| | | btnUserName.Text = UserCenterResourse.UserInfo.UserName;
|
| | | if (UserCenterResourse.UserInfo != null)
|
| | | {
|
| | | //用户身份
|
| | | btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
|
| | | }
|
| | | if (this.btnImperialCrown != null)
|
| | | {
|
| | | //皇冠
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1)
|
| | | {
|
| | | this.btnImperialCrown.Visible = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | this.btnImperialCrown.Visible = true;
|
| | | }
|
| | | }
|
| | |
|
| | | //初始化主菜单的控件
|
| | | this.InitMainMenuInfoControl(frameWhiteBack);
|
| | |
|
| | | return 1;
|
| | | }
|
| | |
|
| | | #endregion
|