private void OnSetUserCredentials(CredentialsInputType type, string email, string password) { _mainView.SetStatePanels(true); Log.Debug(String.Format("SET DATA: {0} / {1} / {2}", email, password, type)); switch (type) { case CredentialsInputType.Register: _firebaseAuthService.AddNewUser(email, password); break; case CredentialsInputType.SignIn: _firebaseAuthService.SignInUser(email, password); break; } }
public void Show(CredentialsInputType type, Action <CredentialsInputType, string, string> acceptAction) { _acceptAction = acceptAction; _type = type; switch (type) { case CredentialsInputType.Register: _buttonTitleLabel.SetLocalizationKey("auth_new"); break; case CredentialsInputType.SignIn: _buttonTitleLabel.SetLocalizationKey("auth_sign_in"); break; } _emailLabel.text = "..."; _passwordLabel.text = "..."; EventDelegate.Add(_acceptButton.onClick, OnAccept); }
private void OnShowForm(CredentialsInputType type) { SetStatePanels(false); _userCredentialsView.Show(type, _onSetUserCredentials); }