Example #1
0
        private void OnRegisterClick()
        {
            string account  = m_RegisterAccountInput.text;
            string password = m_RegisterPasswordInput.text;

            if (CheckInput(account) && CheckInput(password))
            {
                m_Params.OnClickRegister(account, password, () =>
                {
                    m_RegisterPanel.visible = false;
                });
            }
        }
Example #2
0
        protected override void OnOpen(object userData)
        {
            base.OnOpen(userData);

            LoginFormParams data = (LoginFormParams)userData;

            if (data == null)
            {
                Log.Warning("LoginFormParams is invalid.");
                return;
            }

            m_VersionText.text = data.Version;
            m_LoginButton.onClick.Add(obj => data.OnClickLogin(obj));
            m_RegisterButton.onClick.Add(obj => data.OnClickRegister(obj));
        }