//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Wednesday, March 14, 2018
|
//--------------------------------------------------------
|
|
using System;
|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
using LitJson;
|
|
namespace vnxbqy.UI
|
{
|
|
public class IDAuthenticationWin : Window
|
{
|
[SerializeField] InputField m_UserName;
|
[SerializeField] InputField m_IdentityNumber;
|
|
[SerializeField] Button m_Authentication;
|
|
#region Built-in
|
protected override void BindController()
|
{
|
}
|
|
protected override void AddListeners()
|
{
|
m_Authentication.AddListener(Authentication);
|
}
|
|
protected override void OnPreOpen()
|
{
|
}
|
|
protected override void OnAfterOpen()
|
{
|
}
|
|
protected override void OnPreClose()
|
{
|
}
|
|
protected override void OnAfterClose()
|
{
|
}
|
|
#endregion
|
|
private void Authentication()
|
{
|
if (string.IsNullOrEmpty(m_UserName.text))
|
{
|
ServerTipDetails.DisplayNormalTip(Language.Get("UserName_Z"));
|
return;
|
}
|
|
var userName = m_UserName.text;
|
|
if (string.IsNullOrEmpty(m_IdentityNumber.text))
|
{
|
ServerTipDetails.DisplayNormalTip(Language.Get("IdentityNumber_Z"));
|
return;
|
}
|
|
var identityNumber = m_IdentityNumber.text;
|
if (identityNumber.Length != 15 && identityNumber.Length != 18)
|
{
|
ServerTipDetails.DisplayNormalTip(Language.Get("IdentityNumber_Z1"));
|
return;
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|