| | |
| | | /// <summary>
|
| | | /// 成员升级完成的显示画面
|
| | | /// </summary>
|
| | | public class SubAccountLevelUpSuccessForm : UserCenterCommonForm
|
| | | public class SubAccountLevelUpSuccessForm : DialogCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 成员的信息
|
| | | /// </summary> |
| | | /// </summary>
|
| | | private MemberInfoRes memberInfo = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | /// <param name="info">成员信息</param> |
| | | public void ShowForm(MemberInfoRes info) |
| | | { |
| | | this.memberInfo = info; |
| | | |
| | | //设置标题信息 |
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uMemberAuthorization)); |
| | | |
| | | //初始化中部控件 |
| | | this.InitMiddleFrame(); |
| | | /// <param name="info">成员信息</param>
|
| | | public void ShowForm(MemberInfoRes info)
|
| | | {
|
| | | this.memberInfo = info;
|
| | |
|
| | | //初始化中部控件
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | |
|
| | | /// <summary> |
| | | /// 初始化中部控件 |
| | | /// </summary> |
| | | private void InitMiddleFrame() |
| | | /// <summary>
|
| | | /// 初始化中部控件
|
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | //成员授权成功!
|
| | | var btnMsg = new MsgViewControl(800, true);
|
| | | btnMsg.TextID = R.MyInternationalizationString.uMemberAuthorizationSuccess;
|
| | | btnMsg.Y = Application.GetRealHeight(100);
|
| | | btnMsg.TextAlignment = TextAlignment.Center;
|
| | | btnMsg.Gravity = Gravity.CenterHorizontal;
|
| | | bodyFrameLayout.AddChidren(btnMsg);
|
| | | //背景框
|
| | | var frame = new FrameLayout();
|
| | | frame.Width = Application.GetRealWidth(838);
|
| | | frame.Height = Application.GetRealHeight(1097);
|
| | | frame.BackgroundColor = UserCenterColor.Current.White;
|
| | | frame.Gravity = Gravity.Center;
|
| | | frame.Radius = (uint)Application.GetRealHeight(17);
|
| | | bodyFrameLayout.AddChidren(frame);
|
| | |
|
| | | //用户图标 |
| | | var btnUserIcon = new ProfilePhotoControl(); |
| | | btnUserIcon.Y = Application.GetRealHeight(280); |
| | | //用户图标
|
| | | string iconPath = System.IO.Path.Combine(HdlFileNameResourse.UserPictrueDirectory, memberInfo.ChildAccountId + ".png");
|
| | | var btnUserIcon = new ImageView();
|
| | | btnUserIcon.Height = this.GetPictrueRealSize(207);
|
| | | btnUserIcon.Width = this.GetPictrueRealSize(207);
|
| | | btnUserIcon.Radius = (uint)this.GetPictrueRealSize(207) / 2;
|
| | | btnUserIcon.Y = Application.GetRealHeight(104);
|
| | | btnUserIcon.Gravity = Gravity.CenterHorizontal;
|
| | | btnUserIcon.UnSelectedImagePath = "Account/Admin.png"; |
| | | bodyFrameLayout.AddChidren(btnUserIcon); |
| | | |
| | | //权限 |
| | | var btnAuthority = new ViewNormalControl(800, true);
|
| | | btnAuthority.TextAlignment = TextAlignment.Center; |
| | | btnAuthority.Y = btnUserIcon.Bottom + Application.GetRealHeight(10); |
| | | btnAuthority.Gravity = Gravity.CenterHorizontal; |
| | | btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor;
|
| | | btnAuthority.TextID = R.MyInternationalizationString.uMember;
|
| | | if (System.IO.File.Exists(iconPath) == true)
|
| | | {
|
| | | btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(iconPath);
|
| | | }
|
| | | else
|
| | | {
|
| | | btnUserIcon.ImagePath = "Center/Admin.png";
|
| | | }
|
| | | frame.AddChidren(btnUserIcon);
|
| | |
|
| | | //昵称
|
| | | var btnName = new NormalViewControl(frame.Width, Application.GetRealHeight(55), false);
|
| | | btnName.IsBold = true;
|
| | | btnName.TextAlignment = TextAlignment.Center;
|
| | | btnName.Y = Application.GetRealHeight(334);
|
| | | btnName.TextColor = UserCenterColor.Current.TextColor2;
|
| | | btnName.TextSize = 16;
|
| | | btnName.Text = memberInfo.ShowName;
|
| | | frame.AddChidren(btnName);
|
| | |
|
| | | //权限
|
| | | var btnAuthority = new NormalViewControl(frame.Width, Application.GetRealHeight(50), false);
|
| | | btnAuthority.TextAlignment = TextAlignment.Center;
|
| | | btnAuthority.Y = Application.GetRealHeight(400);
|
| | | btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | if (memberInfo.AccountType == 1)
|
| | | {
|
| | | //拥有管理员权限
|
| | | btnAuthority.TextID = R.MyInternationalizationString.uMemberHadActionAuthority;
|
| | | btnAuthority.TextID = R.MyInternationalizationString.Administrator;
|
| | | }
|
| | | bodyFrameLayout.AddChidren(btnAuthority); |
| | | |
| | | //昵称 |
| | | var btnName = new ViewNormalControl(800, true);
|
| | | btnName.TextAlignment = TextAlignment.Center; |
| | | btnName.Y = btnAuthority.Bottom + Application.GetRealHeight(10); |
| | | btnName.Text = memberInfo.UserName; |
| | | btnName.Gravity = Gravity.CenterHorizontal; |
| | | bodyFrameLayout.AddChidren(btnName); |
| | | if (string.IsNullOrEmpty(memberInfo.UserName) == true)
|
| | | else
|
| | | {
|
| | | btnName.Text = memberInfo.Account;
|
| | | btnAuthority.TextID = R.MyInternationalizationString.uMember;
|
| | | }
|
| | | btnAuthority.TextSize = 12;
|
| | | frame.AddChidren(btnAuthority);
|
| | |
|
| | | |
| | | var btnMsg = new NormalViewControl(frame.Width, Application.GetRealHeight(81), false);
|
| | | btnMsg.IsBold = true;
|
| | | if (memberInfo.AccountType == 1)
|
| | | {
|
| | | //授权成功!
|
| | | btnMsg.TextID = R.MyInternationalizationString.uMemberAuthorizationSuccess;
|
| | | }
|
| | | else
|
| | | {
|
| | | //取消成功
|
| | | btnMsg.TextID = R.MyInternationalizationString.uCancelSuccess;
|
| | | }
|
| | | btnMsg.Y = Application.GetRealHeight(541);
|
| | | btnMsg.TextAlignment = TextAlignment.Center;
|
| | | btnMsg.TextSize = 20;
|
| | | frame.AddChidren(btnMsg);
|
| | |
|
| | | var btnView = new NormalViewControl(frame.Width, Application.GetRealHeight(50), false);
|
| | | btnView.Y = btnMsg.Bottom;
|
| | | btnView.TextAlignment = TextAlignment.Center;
|
| | | if (memberInfo.AccountType == 1)
|
| | | {
|
| | | //该成员已成为管理员
|
| | | btnView.TextID = R.MyInternationalizationString.uSubAccountLevelIsUp;
|
| | | }
|
| | | else
|
| | | {
|
| | | //该管理员已成为成员
|
| | | btnView.TextID = R.MyInternationalizationString.uSubAccountLevelIsDown;
|
| | | }
|
| | | btnView.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnView.IsMoreLines = true;
|
| | | btnView.TextSize = 12;
|
| | | frame.AddChidren(btnView);
|
| | |
|
| | | //完成
|
| | | var btnFinish = new BottomClickButton();
|
| | | var btnFinish = new BottomClickButton(688);
|
| | | btnFinish.Y = Application.GetRealHeight(867);
|
| | | btnFinish.TextID = R.MyInternationalizationString.uFinish;
|
| | | bodyFrameLayout.AddChidren(btnFinish);
|
| | | btnFinish.MouseUpEventHandler += (sender, e) =>
|
| | | frame.AddChidren(btnFinish);
|
| | | btnFinish.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | this.CloseForm();
|
| | | };
|
| | |
|
| | | //该成员已成为管理,您的控制权限已移交
|
| | | var btnView = new ViewNormalControl(800, true);
|
| | | btnView.Y = btnFinish.Y - Application.GetRealHeight(100);
|
| | | btnView.TextAlignment = TextAlignment.Center;
|
| | | btnView.TextID = R.MyInternationalizationString.uSubAccountLevelIsUpAndLetAuthorization;
|
| | | btnView.TextColor = UserCenterColor.Current.TextGrayColor;
|
| | | btnView.Gravity = Gravity.CenterHorizontal;
|
| | | bodyFrameLayout.AddChidren(btnView);
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|