using System;
|
using Shared;
|
using HDL_ON.UI.CSS;
|
using HDL_ON.Stan;
|
using System.Collections.Generic;
|
|
namespace HDL_ON.UI
|
{
|
/// <summary>
|
/// 过户结果界面
|
/// </summary>
|
public class TransferResidenceResultPage : EditorCommonForm
|
{
|
#region ■ 变量声明___________________________
|
|
/// <summary>
|
/// 结束事件
|
/// </summary>
|
public Action FinishEvent = null;
|
|
#endregion
|
|
#region ■ 初始化_____________________________
|
|
/// <summary>
|
/// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
/// </summary>
|
/// <param name="i_accountInfo">用户对象信息</param>
|
/// <param name="i_success">是否成功</param>
|
public void ShowForm(AccountInfoResult i_accountInfo, bool i_success)
|
{
|
this.ScrollLeftEnabled = false;
|
//过户
|
base.SetTitleText(Language.StringByID(StringId.Transfer));
|
|
//初始化中部信息
|
this.InitMiddleFrame(i_accountInfo, i_success);
|
|
//移除返回键
|
base.RemoveBackButton();
|
}
|
|
/// <summary>
|
/// 初始化中部信息
|
/// </summary>
|
/// <param name="i_accountInfo">用户对象信息</param>
|
/// <param name="i_success">是否成功</param>
|
private void InitMiddleFrame(AccountInfoResult i_accountInfo, bool i_success)
|
{
|
//清空bodyFrame
|
this.ClearBodyFrame();
|
|
//图片
|
var btnPictrue = new PicViewControl(180, 180);
|
btnPictrue.Y = Application.GetRealHeight(32);
|
btnPictrue.Gravity = Gravity.CenterHorizontal;
|
btnPictrue.UnSelectedImagePath = i_success == true ? "Public/TipIcon_Successfully.png" : "Public/TipIcon_Failed.png";
|
bodyFrameLayout.AddChidren(btnPictrue);
|
|
List<NormalViewControl> listContr = null;
|
if (i_success == true)
|
{
|
//用户{0}已经成为住宅行管理员
|
string strMsg = Language.StringByID(StringId.CongratulationsXXBecomingNNAdministrator).Replace("{0}", i_accountInfo.MemberName);
|
listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS_FontSize.SubheadingFontSize, CSS_Color.MainColor, Application.GetRealHeight(24),
|
btnPictrue.Bottom + Application.GetRealHeight(16));
|
//该住宅的信息将在您的账号中删除
|
var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(18), false);
|
btnMsg2.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(8);
|
btnMsg2.TextAlignment = TextAlignment.Center;
|
btnMsg2.Gravity = Gravity.CenterHorizontal;
|
btnMsg2.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
|
btnMsg2.TextID = StringId.ResidenceDataWillBeDeletedFromYourAccount;
|
bodyFrameLayout.AddChidren(btnMsg2);
|
}
|
else
|
{
|
//过户失败
|
string strMsg = Language.StringByID(StringId.TransferFail);
|
listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS_FontSize.SubheadingFontSize, CSS_Color.AuxiliaryColor2, Application.GetRealHeight(24),
|
btnPictrue.Bottom + Application.GetRealHeight(16));
|
//请重新尝试
|
var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(18), false);
|
btnMsg2.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(8);
|
btnMsg2.TextAlignment = TextAlignment.Center;
|
btnMsg2.Gravity = Gravity.CenterHorizontal;
|
btnMsg2.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
|
btnMsg2.TextID = StringId.PleaseTryAgain;
|
bodyFrameLayout.AddChidren(btnMsg2);
|
}
|
|
//完成
|
var btnConfirm = new BottomClickButton(220);
|
btnConfirm.Y = Application.GetRealHeight(337);
|
btnConfirm.TextID = i_success == true ? StringId.Complete : StringId.Retry;
|
bodyFrameLayout.AddChidren(btnConfirm);
|
btnConfirm.ButtonClickEvent += (sender, e) =>
|
{
|
this.CloseForm();
|
//回调函数
|
this.FinishEvent?.Invoke();
|
this.FinishEvent = null;
|
};
|
}
|
|
#endregion
|
}
|
}
|