private void OnLoginClick() { string account = m_LoginAccountInput.text; string password = m_LoginPasswordInput.text; if (CheckInput(account) && CheckInput(password)) { m_Params.OnClickLogin(account, password); } }
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)); }