| | |
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary> |
| | | public void ShowForm() |
| | | { |
| | | //初始化中部控件 |
| | | this.InitMiddleFrame(); |
| | | /// </summary>
|
| | | public void ShowForm()
|
| | | {
|
| | | //初始化中部控件
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | |
|
| | | /// <summary> |
| | | /// 初始化中部控件 |
| | | /// </summary> |
| | | private void InitMiddleFrame() |
| | | /// <summary>
|
| | | /// 初始化中部控件
|
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | uint roundHeigth = (uint)Application.GetMinRealAverage(6);
|
| | | uint roundHeigth = (uint)Application.GetRealHeight(17);
|
| | |
|
| | | //背景框
|
| | | var frameBack = new FrameLayout();
|
| | |
| | |
|
| | | //用户头像
|
| | | var btnIcon = new ImageView();
|
| | | btnIcon.Height = Application.GetMinRealAverage(294);
|
| | | btnIcon.Width = Application.GetMinRealAverage(294);
|
| | | btnIcon.Radius = (uint)Application.GetMinRealAverage(294) / 2;
|
| | | btnIcon.Height = this.GetPictrueRealSize(294);
|
| | | btnIcon.Width = this.GetPictrueRealSize(294);
|
| | | btnIcon.Radius = (uint)this.GetPictrueRealSize(294) / 2;
|
| | | btnIcon.Y = Application.GetRealHeight(121);
|
| | | btnIcon.Gravity = Gravity.CenterHorizontal;
|
| | | btnIcon.ImagePath = UserCenterResourse.UserInfo.UserIconFile;
|
| | | btnIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
|
| | | frameBack.AddChidren(btnIcon);
|
| | | //用户名
|
| | | var btnUser = new NormalViewControl(frameBack.Width, Application.GetRealHeight(46), false);
|
| | | btnUser.IsBold = true;
|
| | | btnUser.Y = Application.GetRealHeight(147);
|
| | | btnUser.Text = UserCenterResourse.UserInfo.UserName;
|
| | | btnUser.TextAlignment = TextAlignment.Center;
|
| | |
| | | frameDetail.AddChidren(btnUser);
|
| | | //二维码
|
| | | var btnQrCode = new PicViewControl(236, 236);
|
| | | btnQrCode.BackgroundColor = UserCenterColor.Current.Green;
|
| | | btnQrCode.ImageBytes = QRCode.BytesFromText(UserCenterResourse.UserInfo.Account, this.GetPictrueRealSize(236), this.GetPictrueRealSize(236));
|
| | | btnQrCode.Gravity = Gravity.CenterHorizontal;
|
| | | btnQrCode.Y = Application.GetRealHeight(262);
|
| | | frameDetail.AddChidren(btnQrCode);
|