New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Shared.Phone.UserCenter.Transfer
|
| | | {
|
| | | /// <summary>
|
| | | /// 需要过户账号的信息(确认)画面
|
| | | /// </summary>
|
| | | public class AddMemberInfoForm : EditorCommonForm
|
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 1:移交给用户 2:授权给调试人员
|
| | | /// </summary>
|
| | | private int TransferDiv = 0;
|
| | | /// <summary>
|
| | | /// 成员信息
|
| | | /// </summary>
|
| | | private AccountInfoResult memberResult = null;
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | /// <param name="i_infoResult">成员信息</param>
|
| | | /// <param name="i_TransferDiv">1:移交给用户 2:授权给调试人员</param>
|
| | | public void ShowForm(AccountInfoResult i_infoResult, int i_TransferDiv)
|
| | | {
|
| | | this.TransferDiv = i_TransferDiv;
|
| | | this.memberResult = i_infoResult;
|
| | |
|
| | | //设置标题信息
|
| | | base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAccountInfo));
|
| | |
|
| | | //初始化中部控件
|
| | | this.InitMiddleFrame();
|
| | | }
|
| | |
|
| | |
|
| | | /// <summary>
|
| | | /// 初始化中部控件
|
| | | /// </summary>
|
| | | private void InitMiddleFrame()
|
| | | {
|
| | | //清空bodyFrame
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | //头像
|
| | | var btnUserIcon = new ImageView();
|
| | | btnUserIcon.Height = this.GetPictrueRealSize(207);
|
| | | btnUserIcon.Width = this.GetPictrueRealSize(207);
|
| | | btnUserIcon.Radius = (uint)this.GetPictrueRealSize(207) / 2;
|
| | | if (memberResult.HeadImage != null)
|
| | | {
|
| | | btnUserIcon.ImageBytes = memberResult.HeadImage;
|
| | | }
|
| | | else
|
| | | {
|
| | | btnUserIcon.ImagePath = "Center/Admin.png";
|
| | | }
|
| | | btnUserIcon.Y = Application.GetRealHeight(219);
|
| | | btnUserIcon.Gravity = Gravity.CenterHorizontal;
|
| | | bodyFrameLayout.AddChidren(btnUserIcon);
|
| | |
|
| | | //成员ID
|
| | | var btnUserId = new NormalViewControl(800, 50, true);
|
| | | btnUserId.IsBold = true;
|
| | | btnUserId.Y = Application.GetRealHeight(472);
|
| | | btnUserId.Gravity = Gravity.CenterHorizontal;
|
| | | btnUserId.Text = memberResult.Account;
|
| | | btnUserId.TextAlignment = TextAlignment.Center;
|
| | | btnUserId.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | bodyFrameLayout.AddChidren(btnUserId);
|
| | |
|
| | | //昵称
|
| | | var btnName = new NormalViewControl(800, 55, true);
|
| | | btnName.IsBold = true;
|
| | | btnName.Y = Application.GetRealHeight(541);
|
| | | btnName.Gravity = Gravity.CenterHorizontal;
|
| | | btnName.TextAlignment = TextAlignment.Center;
|
| | | btnName.TextSize = 16;
|
| | | //如果它本身就没名字的话,把他的ID作为昵称
|
| | | btnName.Text = string.IsNullOrEmpty(memberResult.UserName) == true ? memberResult.Account : memberResult.UserName;
|
| | | bodyFrameLayout.AddChidren(btnName);
|
| | |
|
| | | //请确认账号是否正确{0}如正确请点击确认
|
| | | string strMsg = Language.StringByID(R.MyInternationalizationString.uPleaseConfirmAccoutIsRightAndClick);
|
| | | if (strMsg.Contains("{0}") == true)
|
| | | {
|
| | | strMsg = string.Format(strMsg, "\r\n");
|
| | | }
|
| | | var btnmsg = new NormalViewControl(800, 100, true);
|
| | | btnmsg.IsBold = true;
|
| | | btnmsg.Y = Application.GetRealHeight(913);
|
| | | btnmsg.TextSize = 12;
|
| | | btnmsg.Text = strMsg;
|
| | | btnmsg.IsMoreLines = true;
|
| | | btnmsg.TextAlignment = TextAlignment.Center;
|
| | | btnmsg.TextColor = UserCenterColor.Current.TextGrayColor2;
|
| | | btnmsg.Gravity = Gravity.CenterHorizontal;
|
| | | bodyFrameLayout.AddChidren(btnmsg);
|
| | |
|
| | | //确认
|
| | | var btnOk = new BottomClickButton(688);
|
| | | btnOk.Y = Application.GetRealHeight(1045);
|
| | | btnOk.TextID = R.MyInternationalizationString.uConfirm1;
|
| | | bodyFrameLayout.AddChidren(btnOk);
|
| | | btnOk.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (this.memberResult.Account == UserCenterResourse.UserInfo.Phone
|
| | | || this.memberResult.Account == UserCenterResourse.UserInfo.Email)
|
| | | {
|
| | | if (this.TransferDiv == 1)
|
| | | {
|
| | | //不能自己过户给自己
|
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uYouCannotTransferOwnershipToYourself));
|
| | | }
|
| | | else
|
| | | {
|
| | | //不能自己授权给自己
|
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uYouCanotDelegateToYourself));
|
| | | }
|
| | | return;
|
| | | }
|
| | | this.CloseForm();
|
| | |
|
| | | var form = new TransferingResidenceForm();
|
| | | form.AddForm(this.memberResult, this.TransferDiv);
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|