Esempio n. 1
0
    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;
        }
    }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
 private void OnShowForm(CredentialsInputType type)
 {
     SetStatePanels(false);
     _userCredentialsView.Show(type, _onSetUserCredentials);
 }