using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace LoyalSoftSDK { public class GetPassPanel : BaseUIForm { private Text errText; private InputField phoneInput; private InputField codeInput; private InputField passInput; private InputField passAginIput; private GameObject codeBtn; private GameObject submitBtn; private GameObject backButton; private Text codeBtnText; // Use this for initialization private string editAccount; private string editPassWord; private string editPassAgin; private string editCode; private bool isGetCode; private DateTime getCodeTime; private int reGetCodeTime = 120; public override void Init() { curUIType = UIType.Normal; errText = this.transform.Find("BackPanel/ErrText").gameObject.GetComponent(); phoneInput = this.transform.Find("BackPanel/PhoneInput").gameObject.GetComponent(); phoneInput.onEndEdit.AddListener(OnPhoneInputEndEdit); codeInput = this.transform.Find("BackPanel/CodeInput").gameObject.GetComponent(); codeInput.onEndEdit.AddListener(OnCodeInputEndEdit); passInput = this.transform.Find("BackPanel/PassInput").gameObject.GetComponent(); passInput.onEndEdit.AddListener(OnPassInputEndEdit); passAginIput = this.transform.Find("BackPanel/PassAginInput").gameObject.GetComponent(); passAginIput.onEndEdit.AddListener(OnPassAginIputEndEdit); codeBtn = this.transform.Find("BackPanel/CodeButton").gameObject; EventTriggerListener.Get(codeBtn).onClick = OnCodeBtnClick; submitBtn = this.transform.Find("BackPanel/SubmitButton").gameObject; EventTriggerListener.Get(submitBtn).onClick = OnSubmitBtnClick; backButton = this.transform.Find("BackPanel/BackButton").gameObject; EventTriggerListener.Get(backButton).onClick = OnBackButtonClick; codeBtnText = this.transform.Find("BackPanel/CodeButton/Text").gameObject.GetComponent(); } public override void Display(BaseUIForm _parent, Dictionary data) { phoneInput.text = ""; codeInput.text = ""; passInput.text = ""; passAginIput.text = ""; errText.text = ""; string action; data.TryGetValue("action", out action); switch (action) { case "getpass": data.TryGetValue("account", out editAccount); phoneInput.text = editAccount; break; } base.Display(_parent, data); } private bool IsGetCode { get { return isGetCode; } set { isGetCode = value; if (isGetCode) { EventTriggerListener.Get(codeBtn).onClick = null; codeBtn.transform.GetComponent