using System;
|
using Shared;
|
using HDL_ON.UI.CSS;
|
using System.Threading;
|
using HDL_ON.DAL.Server;
|
|
namespace HDL_ON.UI
|
{
|
/// <summary>
|
/// 新绑定或者换绑--验证码验证并绑定
|
/// </summary>
|
public partial class NewBindVerificationCodePage : FrameLayout
|
{
|
FrameLayout bodyView;
|
|
Button btnNum1;
|
Button btnNum1Line;
|
|
Button btnNum2;
|
Button btnNum2Line;
|
|
Button btnNum3;
|
Button btnNum3Line;
|
|
Button btnNum4;
|
Button btnNum4Line;
|
|
Button btnNum5;
|
Button btnNum5Line;
|
|
Button btnNum6;
|
Button btnNum6Line;
|
|
EditText et;
|
|
Button btnResend;
|
|
Button btnTip;
|
|
Action<string> action;
|
|
int titleId;
|
|
///// <summary>
|
///// 操作目标类型 1:邮箱,2:手机
|
///// </summary>
|
//int optionType;
|
/// <summary>
|
/// 倒计时时间
|
/// </summary>
|
int time = 0;
|
/// <summary>
|
/// 是否手机
|
/// </summary>
|
bool isPhone;
|
/// <summary>
|
/// 是否换绑
|
/// </summary>
|
bool isModifyBind;
|
|
/// <summary>
|
/// 新绑定的账号
|
/// </summary>
|
string verAccount;
|
/// <summary>
|
/// 手机区号
|
/// </summary>
|
public string PhoneZoneCode = "86";
|
|
|
public NewBindVerificationCodePage()
|
{
|
bodyView = this;
|
}
|
|
/// </summary>
|
/// <param name="act">回掉函数</param>
|
/// <param name="tId">页面标题</param>
|
/// <param name="account">账号</param>
|
/// <param name="bPhone">是否手机</param>
|
/// <param name="t">倒计时时间</param>
|
/// <param name="isModifyBind">是否为修改绑定</param>
|
public void LoadPage(Action<string> act, int tId, string account, bool bPhone, int t, bool isModifyBind)
|
{
|
action = act;
|
titleId = tId;
|
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
|
isPhone = bPhone;
|
time = t;
|
this.verAccount = account;
|
this.isModifyBind = isModifyBind;
|
|
Action backAction = () => {
|
Application.HideSoftInput();
|
BackConfirmAction();
|
};
|
new TopViewDiv(bodyView, Language.StringByID(tId), false).LoadTopView(backAction);
|
|
btnTip = new Button()
|
{
|
Y = Application.GetRealHeight(64),
|
Height = Application.GetRealHeight(84),
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.TextFontSize,
|
TextAlignment = TextAlignment.Center,
|
TextID = StringId.VerificationCodePrompt,
|
};
|
bodyView.AddChidren(btnTip);
|
|
btnNum1 = new Button()
|
{
|
X = Application.GetRealWidth(24),
|
Y = Application.GetRealHeight(156),
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(38),
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextAlignment = TextAlignment.Center,
|
IsBold = true,
|
};
|
bodyView.AddChidren(btnNum1);
|
|
btnNum1Line = new Button()
|
{
|
X = Application.GetRealWidth(24),
|
Y = btnNum1.Bottom,
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(2),
|
BackgroundColor = CSS_Color.PromptingColor2,
|
SelectedBackgroundColor = CSS_Color.MainColor,
|
IsSelected = true
|
};
|
bodyView.AddChidren(btnNum1Line);
|
|
btnNum2 = new Button()
|
{
|
X = Application.GetRealWidth(80),
|
Y = Application.GetRealHeight(156),
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(38),
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextAlignment = TextAlignment.Center,
|
IsBold = true,
|
};
|
bodyView.AddChidren(btnNum2);
|
|
btnNum2Line = new Button()
|
{
|
X = Application.GetRealWidth(80),
|
Y = btnNum2.Bottom,
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(1),
|
BackgroundColor = CSS_Color.PromptingColor2,
|
SelectedBackgroundColor = CSS_Color.MainColor,
|
};
|
bodyView.AddChidren(btnNum2Line);
|
|
btnNum3 = new Button()
|
{
|
X = Application.GetRealWidth(136),
|
Y = Application.GetRealHeight(156),
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(38),
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextAlignment = TextAlignment.Center,
|
IsBold = true,
|
};
|
bodyView.AddChidren(btnNum3);
|
|
btnNum3Line = new Button()
|
{
|
X = Application.GetRealWidth(136),
|
Y = btnNum3.Bottom,
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(1),
|
BackgroundColor = CSS_Color.PromptingColor2,
|
SelectedBackgroundColor = CSS_Color.MainColor,
|
};
|
bodyView.AddChidren(btnNum3Line);
|
|
btnNum4 = new Button()
|
{
|
X = Application.GetRealWidth(192),
|
Y = Application.GetRealHeight(156),
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(38),
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextAlignment = TextAlignment.Center,
|
IsBold = true,
|
};
|
bodyView.AddChidren(btnNum4);
|
|
btnNum4Line = new Button()
|
{
|
X = Application.GetRealWidth(192),
|
Y = btnNum4.Bottom,
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(1),
|
BackgroundColor = CSS_Color.PromptingColor2,
|
SelectedBackgroundColor = CSS_Color.MainColor,
|
};
|
bodyView.AddChidren(btnNum4Line);
|
|
btnNum5 = new Button()
|
{
|
X = Application.GetRealWidth(248),
|
Y = Application.GetRealHeight(156),
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(38),
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextAlignment = TextAlignment.Center,
|
IsBold = true,
|
};
|
bodyView.AddChidren(btnNum5);
|
|
btnNum5Line = new Button()
|
{
|
X = Application.GetRealWidth(248),
|
Y = btnNum5.Bottom,
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(1),
|
BackgroundColor = CSS_Color.PromptingColor2,
|
SelectedBackgroundColor = CSS_Color.MainColor,
|
};
|
bodyView.AddChidren(btnNum5Line);
|
|
btnNum6 = new Button()
|
{
|
X = Application.GetRealWidth(304),
|
Y = Application.GetRealHeight(156),
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(38),
|
TextColor = CSS_Color.FirstLevelTitleColor,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
TextAlignment = TextAlignment.Center,
|
IsBold = true,
|
};
|
bodyView.AddChidren(btnNum6);
|
|
btnNum6Line = new Button()
|
{
|
X = Application.GetRealWidth(304),
|
Y = btnNum6.Bottom,
|
Width = Application.GetRealWidth(48),
|
Height = Application.GetRealHeight(1),
|
BackgroundColor = CSS_Color.PromptingColor2,
|
SelectedBackgroundColor = CSS_Color.MainColor,
|
};
|
bodyView.AddChidren(btnNum6Line);
|
|
et = new EditText()
|
{
|
Y = Application.GetRealHeight(276),
|
Gravity = Gravity.CenterHorizontal,
|
Width = Application.GetRealWidth(100),
|
Height = Application.GetRealHeight(10),
|
IsNumberKeyboardType = true,
|
Foucs = true,
|
};
|
bodyView.AddChidren(et);
|
|
btnResend = new Button()
|
{
|
Y = Application.GetRealHeight(276),
|
Gravity = Gravity.CenterHorizontal,
|
Width = Application.GetRealWidth(220),
|
Height = Application.GetRealWidth(44),
|
SelectedBackgroundColor = CSS_Color.MainColor,
|
BackgroundColor = CSS_Color.PromptingColor1,
|
TextAlignment = TextAlignment.Center,
|
TextColor = CSS_Color.MainBackgroundColor,
|
TextID = StringId.Resend,
|
TextSize = CSS_FontSize.SubheadingFontSize,
|
IsBold = true,
|
Radius = (uint)Application.GetRealWidth(22),
|
BorderColor = 0x00000000,
|
BorderWidth = 0,
|
};
|
bodyView.AddChidren(btnResend);
|
|
LoadThread_SendVerCode();
|
LoadEvent_Resend();
|
LoadEvent_VerificationEntryEvent();
|
}
|
}
|
|
|
//---------------------------------------------
|
public partial class NewBindVerificationCodePage
|
{
|
/// <summary>
|
/// 验证码输入变化事件
|
/// </summary>
|
void LoadEvent_VerificationEntryEvent()
|
{
|
EventHandler<MouseEventArgs> clickEvent = (sender, e) => {
|
et.Foucs = true;
|
var etCode = et.Text;
|
switch (etCode.Length)
|
{
|
case 0:
|
btnNum1Line.IsSelected = true;
|
btnNum2Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum1Line.Height = Application.GetRealHeight(2);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
break;
|
case 1:
|
btnNum2Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(2);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
break;
|
case 2:
|
btnNum3Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum2Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(3);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
break;
|
case 3:
|
btnNum4Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum2Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(4);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
break;
|
case 4:
|
btnNum5Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum2Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(5);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
break;
|
case 5:
|
btnNum6Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum2Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(2);
|
break;
|
}
|
};
|
btnNum1.MouseUpEventHandler = clickEvent;
|
btnNum2.MouseUpEventHandler = clickEvent;
|
btnNum3.MouseUpEventHandler = clickEvent;
|
btnNum4.MouseUpEventHandler = clickEvent;
|
btnNum5.MouseUpEventHandler = clickEvent;
|
btnNum6.MouseUpEventHandler = clickEvent;
|
|
et.TextChangeEventHandler = (sender, e) => {
|
var etCode = et.Text;
|
switch (etCode.Length)
|
{
|
case 0:
|
btnNum1Line.IsSelected = true;
|
btnNum2Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum1Line.Height = Application.GetRealHeight(2);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
btnNum1.Text = "";
|
btnNum2.Text = "";
|
btnNum3.Text = "";
|
btnNum4.Text = "";
|
btnNum5.Text = "";
|
btnNum6.Text = "";
|
break;
|
case 1:
|
btnNum2Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum1.Text = etCode.Substring(0, 1);
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(2);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
btnNum2.Text = "";
|
btnNum3.Text = "";
|
btnNum4.Text = "";
|
btnNum5.Text = "";
|
btnNum6.Text = "";
|
break;
|
case 2:
|
btnNum3Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum2Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum2.Text = etCode.Substring(1, 1);
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(2);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
btnNum3.Text = "";
|
btnNum4.Text = "";
|
btnNum5.Text = "";
|
btnNum6.Text = "";
|
break;
|
case 3:
|
btnNum4Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum2Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum3.Text = etCode.Substring(2, 1);
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(2);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
btnNum4.Text = "";
|
btnNum5.Text = "";
|
btnNum6.Text = "";
|
break;
|
case 4:
|
btnNum5Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum2Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum6Line.IsSelected = false;
|
btnNum4.Text = etCode.Substring(3, 1);
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(2);
|
btnNum6Line.Height = Application.GetRealHeight(1);
|
btnNum5.Text = "";
|
btnNum6.Text = "";
|
break;
|
case 5:
|
btnNum6Line.IsSelected = true;
|
btnNum1Line.IsSelected = false;
|
btnNum2Line.IsSelected = false;
|
btnNum3Line.IsSelected = false;
|
btnNum4Line.IsSelected = false;
|
btnNum5Line.IsSelected = false;
|
btnNum5.Text = etCode.Substring(4, 1);
|
btnNum1Line.Height = Application.GetRealHeight(1);
|
btnNum2Line.Height = Application.GetRealHeight(1);
|
btnNum3Line.Height = Application.GetRealHeight(1);
|
btnNum4Line.Height = Application.GetRealHeight(1);
|
btnNum5Line.Height = Application.GetRealHeight(1);
|
btnNum6Line.Height = Application.GetRealHeight(2);
|
btnNum6.Text = "";
|
break;
|
case 6:
|
btnNum6.Text = etCode.Substring(5, 1);
|
et.Foucs = false;
|
new Thread(() =>
|
{
|
bool result = false;
|
Action act = () => { };
|
Application.RunOnMainThread(() =>
|
{
|
act = new PublicAssmebly().TipLoadingMsgDialog(Language.StringByID(StringId.SavingPleaseWait));
|
});
|
|
var resultObj = new HttpServerRequest().BindAccount(verAccount, etCode, isPhone);
|
if (resultObj == StateCode.SUCCESS)
|
{
|
result = true;
|
}
|
else
|
{
|
//失败提示
|
IMessageCommon.Current.ShowErrorInfoAlter(resultObj);
|
}
|
Application.RunOnMainThread(() =>
|
{
|
act();
|
});
|
if (result)
|
{
|
//绑定成功
|
BindSuccess();
|
|
}
|
})
|
{ IsBackground = true }.Start();
|
|
break;
|
}
|
};
|
}
|
|
/// <summary>
|
/// 绑定成功
|
/// </summary>
|
void BindSuccess()
|
{
|
Application.RunOnMainThread(() =>
|
{
|
var tipTitle = "";
|
var tipMsg = "";
|
if (isPhone)
|
{
|
UserInfo.Current.userMobileInfo = verAccount;
|
//请使用新的手机账号登录APP
|
tipMsg = Language.StringByID(StringId.PleaseLoginWithNewMobileAccount);
|
if (isModifyBind)
|
{
|
//登录手机修改完成
|
tipTitle = Language.StringByID(StringId.LoginMobileAccountModificationCompleted);
|
}
|
else
|
{
|
//登录手机绑定完成
|
tipTitle = Language.StringByID(StringId.LoginMobileAccountBindCompleted);
|
}
|
}
|
else
|
{
|
UserInfo.Current.userEmailInfo = verAccount;
|
//请使用新的邮箱账号登录APP
|
tipMsg = Language.StringByID(StringId.PleaseLoginWithNewEmailAccount);
|
if (isModifyBind)
|
{
|
//登录邮箱修改完成
|
tipTitle = Language.StringByID(StringId.LoginEmailAccountModificationCompleted);
|
}
|
else
|
{
|
//登录邮箱绑定完成
|
tipTitle = Language.StringByID(StringId.LoginEmailAccountBindCompleted);
|
|
}
|
}
|
|
var page = new OperationResultDisPalyPage();
|
page.Show();
|
page.LoadPage(true, Language.StringByID(titleId), tipTitle, tipMsg);
|
|
if (isModifyBind)
|
{
|
ClosePageWithCount(3);
|
}
|
else
|
{
|
ClosePageWithCount(2);
|
}
|
|
action(verAccount);
|
});
|
}
|
|
/// <summary>
|
/// 指定关闭页面个数
|
/// </summary>
|
/// <param name="countPage"></param>
|
void ClosePageWithCount(int countPage)
|
{
|
//关闭多少个页面
|
for (int i = 0; i < countPage; i++)
|
{
|
MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
|
}
|
}
|
|
/// <summary>
|
/// 重发验证码等待线程
|
/// </summary>
|
void LoadThread_SendVerCode()
|
{
|
btnResend.IsSelected = false;
|
et.Foucs = true;
|
if (time == 0)
|
{
|
time = 60;
|
new Thread(() =>
|
{
|
//2.2 获取验证码
|
ResponsePackNew resultObj;
|
if (!isPhone)//邮箱
|
{
|
resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, verAccount);
|
}
|
else
|
{
|
resultObj = new HttpServerRequest().VerificationCodeSend(VerifyType.REGISTER_USER_SYSTEM, verAccount, true, PhoneZoneCode);
|
}
|
|
|
})
|
{ IsBackground = true }.Start();
|
}
|
new Thread(() =>
|
{
|
while (time > 0)
|
{
|
time--;
|
Application.RunOnMainThread(() =>
|
{
|
btnResend.Text = time.ToString() + "s";
|
});
|
Thread.Sleep(1000);
|
}
|
Application.RunOnMainThread(() =>
|
{
|
btnResend.IsSelected = true;
|
btnResend.TextID = StringId.GetVerificationCode;
|
time = 0;
|
});
|
})
|
{ IsBackground = true }.Start();
|
}
|
|
/// <summary>
|
/// 重发验证码事件
|
/// </summary>
|
void LoadEvent_Resend()
|
{
|
btnResend.MouseUpEventHandler = (sender, e) => {
|
LoadThread_SendVerCode();
|
};
|
}
|
|
/// <summary>
|
/// 返回二次确认事件
|
/// </summary>
|
void BackConfirmAction()
|
{
|
//验证码发送成功,二次确认退出
|
if (btnTip.TextID == StringId.VerificationCodePrompt)
|
{
|
Action cancelAction = () =>
|
{
|
if (bodyView != null)
|
{
|
bodyView.RemoveFromParent();
|
}
|
};
|
new ConfirmDialog().ShowDialog(StringId.Tip, StringId.VerificationCodeMayBeDelayed, null, cancelAction, StringId.ReturnStr, StringId.WaitAMoment);
|
}
|
else
|
{
|
//直接关闭
|
if (bodyView != null)
|
{
|
bodyView.RemoveFromParent();
|
}
|
}
|
}
|
|
}
|
}
|