Exemplo n.º 1
0
    private async void _handleLoginButtonClicked()
    {
        var logInSuccessfull = await MainCanvas.AsyncTryLogIn(this._loginInput.text, this._passwordInput.text);

        this._passwordInput.text = "";

        if (logInSuccessfull)
        {
            //Setting language if exists in possible languages
            if (UserLoader.LoggedUser.DefaultLang != null && Translator.GetPossibleLangs().Contains(UserLoader.LoggedUser.DefaultLang))
            {
                Translator.SetLang(UserLoader.LoggedUser.DefaultLang);
            }

            //Hidding aux page
            MainCanvas.HideAuxPage();
        }
    }
Exemplo n.º 2
0
    private async void _handleDemoButtonClicked()
    {
        var emailText     = Translator.GetTranslation("LoginPage.DemoAccountEmail");
        var emailPassword = Translator.GetTranslation("LoginPage.DemoAccountPassword");

        var logInSuccessfull = await MainCanvas.AsyncTryLogIn(emailText, emailPassword);

        this._loginInput.text = "";

        this._passwordInput.text = "";

        if (logInSuccessfull)
        {
            //Setting language if exists in possible languages
            if (UserLoader.LoggedUser.DefaultLang != null && Translator.GetPossibleLangs().Contains(UserLoader.LoggedUser.DefaultLang))
            {
                Translator.SetLang(UserLoader.LoggedUser.DefaultLang);
            }

            //Hidding aux page
            MainCanvas.HideAuxPage();
        }
    }
Exemplo n.º 3
0
 private void _handleHidePageButtonClicked()
 {
     MainCanvas.HideAuxPage();
 }