| | |
| | | /// 用户名字
|
| | | /// </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
|
| | |
|
| | |
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //信息提示控件
|
| | | this.msgControl = new MessageManagementControl();
|
| | | msgControl.Y = Application.GetRealHeight(127);
|
| | | msgControl.X = Application.GetRealWidth(953);
|
| | | bodyFrameLayout.AddChidren(this.msgControl);
|
| | |
|
| | | //个人中心
|
| | | var btnTitle = new NormalViewControl(350, 100, true);
|
| | | btnTitle.X = ControlCommonResourse.XXLeft;
|
| | |
| | | frameBack.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
|
| | | frameBack.Y = Application.GetRealHeight(380);
|
| | | frameBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameBack.Radius = (uint)Application.GetMinRealAverage(12);
|
| | | frameBack.Radius = 12;
|
| | | 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)
|
| | | {
|
| | | //用户头像
|
| | | var btnUserIcon = new IconViewControl(280);
|
| | | this.btnUserIcon = new ImageView();
|
| | | btnUserIcon.Height = Application.GetMinRealAverage(280);
|
| | | btnUserIcon.Width = Application.GetMinRealAverage(280);
|
| | | btnUserIcon.Radius = (uint)Application.GetMinRealAverage(280) / 2;
|
| | | btnUserIcon.X = Application.GetRealWidth(121);
|
| | | btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
|
| | | btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
|
| | | bodyFrameLayout.AddChidren(btnUserIcon);
|
| | | btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
|
| | | btnUserIcon.MouseUpEventHandler += (sender, e) =>
|
| | |
| | | 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;
|
| | |
| | | frameWhiteBack.Gravity = Gravity.CenterHorizontal;
|
| | | frameWhiteBack.Height = Application.GetRealHeight(371);
|
| | | frameWhiteBack.Width = frameWhite.Width - Application.GetRealWidth(29 * 2);
|
| | | frameWhiteBack.Radius = (uint)Application.GetMinRealAverage(10);
|
| | | frameWhiteBack.Radius = 10;
|
| | | frameWhiteBack.BackgroundColor = UserCenterColor.Current.White;
|
| | | frameWhite.AddChidren(frameWhiteBack);
|
| | | }
|
| | |
| | | frame.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //住宅接口不需要特殊的登陆Token
|
| | | var form = new Residence.ResidenceManagementForm();
|
| | | var form = new Residence.ResidenceListForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
| | | btnBackView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | rowback.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new HdlBackup.HdlBackupMenuForm();
|
| | | var form = new HdlBackup.HdlBackupListForm();
|
| | | form.AddForm();
|
| | | };
|
| | | }
|
| | |
| | | btnSuView.X -= ControlCommonResourse.XXLeft / 2;
|
| | | rowSuggestion.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new DeviceDoorLock.DoorLockHistoryLogForm();
|
| | | form.AddForm("天下第一");
|
| | | var form = new Suggestion.FeedbackForm();
|
| | | form.AddForm();
|
| | | };
|
| | |
|
| | | //关于我们
|
| | |
| | | /// <summary>
|
| | | /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
|
| | | /// </summary>
|
| | | public override void FormActionAgainEvent()
|
| | | public override int FormActionAgainEvent()
|
| | | {
|
| | | //用户头像
|
| | | 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 (this.btnImperialCrown != null)
|
| | | {
|
| | | //皇冠
|
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1)
|
| | | {
|
| | | this.btnImperialCrown.Visible = false;
|
| | | }
|
| | | else
|
| | | {
|
| | | this.btnImperialCrown.Visible = true;
|
| | | }
|
| | | }
|
| | |
|
| | | //刷新信息提示控件
|
| | | this.msgControl?.RefreshStatu();
|
| | |
|
| | | //初始化主菜单的控件
|
| | | this.InitMainMenuInfoControl(frameWhiteBack);
|
| | |
|
| | | return 1;
|
| | | }
|
| | |
|
| | | #endregion
|