public LoginWithEmail() { InitializeComponent(); lblPsswdClick(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); }
public Page1() { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); showInfo(); pictureModify(); }
public profiloPalestra() { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); pictureFullScreen(); getInfo(uid); picker.SelectedIndexChanged += async(sender, args) => { if (picker.SelectedIndex == -1) { } else { string colorName = picker.Items[picker.SelectedIndex]; picker.SelectedItem = -1; if (colorName.Equals("Modifica Profilo")) { await Navigation.PushAsync(new home.palestra.Page1()); } else { _auth.Logout(); Preferences.Clear("profilePic"); Navigation.InsertPageBefore(new Main(), Navigation.NavigationStack[0]); await Navigation.PopToRootAsync(); } } }; }
public Abbonamento() { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); this.BindingContext = new model.MyViewModel(); getInfoSub(uidSub); }
public App(IFirebaseAuthenticator authenticator) { InitializeComponent(); DeviceToken = authenticator.GetDeviceToken(); FirebaseAuth = authenticator; MainPage = new NavigationPage(new Registration(authenticator)); }
public MainPage(IFirebaseAuthenticator firebaseAuthenticator) { InitializeComponent(); authenticator = firebaseAuthenticator; Auth.Clicked += Auth_Click; Out.Clicked += Out_Click; }
/// <summary> /// Initializes a new instance of the <see cref="T:Charanke.ViewModels.LoginPageViewModel"/> class. /// </summary> public LoginPageViewModel(IFirebaseAuthenticator firebaseAuthenticator) { FirebaseAuthenticator = firebaseAuthenticator; _AuthModel = new FirebaseAuthenticationModel(FirebaseAuthenticator); Email = ReactiveProperty.FromObject( _AuthModel, x => x.Email); Password = ReactiveProperty.FromObject( _AuthModel, x => x.Password); AuthMessage = _AuthModel.ObserveProperty(m => m.AuthMessage) .ToReadOnlyReactiveProperty(); SendSignInByEmailAndPassword = Email.ObserveHasErrors.CombineLatest( Password.ObserveHasErrors, (x, y) => !x && !y) .ToReactiveCommand(); SendSignUpByEmailAndPassword = Email.ObserveHasErrors.CombineLatest( Password.ObserveHasErrors, (x, y) => !x && !y) .ToReactiveCommand(); SendSignInByEmailAndPassword.Subscribe( async() => await this.SignInByEmailAndPasswordAction()); SendSignUpByEmailAndPassword.Subscribe( async() => await this.SignUpByEmailAndPasswordAction()); }
public async Task AddUser(string email, string senha) { IFirebaseAuthenticator firebaseAuthenticator = DependencyService.Get <IFirebaseAuthenticator>(); string token = await firebaseAuthenticator.CreateUserWithEmailAndPassword(email, senha); (Application.Current as App).AuthToken = token; }
public LoginViewModel(IFirebaseAuthenticator firebaseAuthenticator, Services.NavigationService navigationService) { this.firebaseAuthenticator = firebaseAuthenticator; this.navigationService = navigationService; LoginCmd = new Command(async() => await Login()); }
public Home() { App.uid = Preferences.Get("uid", null); App.loggedEmail = Preferences.Get("loggedEmail", null); App.password = Preferences.Get("password", null); string uid = App.uid; if (CrossConnectivity.Current.IsConnected) { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); //VERIFICO SE CHI SI E' LOGGATO E' UTENTE O PALESTRA getInfo(uid); checkTurnoPrenotato(uid); //checkSub(App.loggedUser.AbbonamentoIscrizione); } else { DisplayAlert("Attenzione!", "Nessuna connessione ad Internet", "Ok", "Riprova"); System.Diagnostics.Process.GetCurrentProcess().Kill(); } NavigationPage.SetHasBackButton(this, false); }
public signUpDetailsGym(string nome) { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); App.nome = nome; //INIZIALIZZO GESTURE TOCCA IMMAGINE pictureModify(); }
public RegistrationViewModel(IRegistration reg, IFirebaseAuthenticator authenticator) { regInfo = reg; firebaseAuthenticator = authenticator; ToHomePage = new Command(GoToHomePage); ToForgetPassPage = new Command(GoToForgetPassPage); ToSignUpPage = new Command(GoToSignUpPage); }
public CreatedSub(string uidAbbonamentoPalestra) { InitializeComponent(); App.uidAbbonamentoPalestra = uidAbbonamentoPalestra; _auth = DependencyService.Get <IFirebaseAuthenticator>(); this.BindingContext = new model.ModelAbbonamentoPalestra(); getInfoSub(uidAbbonamentoPalestra); }
} //Command to confirm new account #endregion Properties #region Class Methods /// <summary> /// Constructor /// </summary> public CreateNewAccountViewModel() { Title = "Create New Account"; auth = DependencyService.Resolve <IFirebaseAuthenticator>(); //Fetch platform-specific Firebase Authentication implementation NavigateBackCommand = new Command(() => App.SetNewPage <LoginPage>()); ConfirmNewAccountCommand = new Command(ConfirmNewAccount); }
public PrenotaTurno(string uidPalestra, DateTime giornoScelto) { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); string DataOdierna = String.Format("{0:MM/dd/yyyy}", giornoScelto); App.giornoscelto = DataOdierna; getTurni(uidPalestra, giornoScelto); }
} //Command for password request button #endregion Properties #region Class Methods /// <summary> /// Constructor /// </summary> public PasswordRetrievalViewModel() { Title = "Reset Password"; auth = DependencyService.Resolve <IFirebaseAuthenticator>(); //Fetch platform-specific Firebase Authentication implementation /* Initialize Commands */ NavigateBackCommand = new Command(() => App.SetNewPage <LoginPage>()); RequestPasswordResetCommand = new Command(ForgotPasswordClicked); }
public AbbonamentoPopup(string uidG) { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); this.BindingContext = new model.MyViewModel(); List <string> tipoabbonamento = new List <string>(); }
// Реализация функции, которая вызывается при нажатии на кнопку // Она привязывается в файле xaml private async void Button_Clicked(object sender, EventArgs e) { // С помощью CheckValidatiions() проверяем, что нужные поля заполнены if (CheckValidatiions()) { string token; // В области try пытаемся выполнить код, если что-то ломается, то выполняется блок catch try { // Блок try // Реализация IFirebaseAuthenticator лежит в файле IFirebaseAuthenticator.cs // С помощью DependencyService.Get<>() мы цепляем реализацию класса из андроидовской части, условно говоря // То есть по сути функция LoginWithEmailPassword() будет вызвана из файла FirebaseAuthenticator.cs token = await DependencyService.Get <IFirebaseAuthenticator>().LoginWithEmailPassword(l.Text, p.Text); } catch (ArgumentException exp) { // Блок catch, в котором мы обрабатываем самостоятельно созданную ошибку // Она отсылается, наример, в функции LoginWithEmailPassword() и имеет тип ArgumentException // Message - текст, который мы написали в ошибке token = exp.Message; } catch (Exception) { // Тут обрабатываем остальные ошибки token = "Another error"; } // Отображаем полученный токен autt.Text = token; string result = ""; IFirebaseAuthenticator user = null; try { // Получили наш объект с данными user = await DependencyService.Get <IFirebaseAuthenticator>().GetDataFromDataBase(l.Text); result = "Email: < " + user.Email + " >\nName: < " + user.Name + " >\nSecond Name: < " + user.SecondName + " >"; // autt указан в Label в поле x:Name. Этот Label инициализирован в файле View3.xaml autt.Text = result; // Передали объект дальше View2.user = user; // Вернулись на страницу назад await Navigation.PopAsync(); } catch (ArgumentException exp) { result = exp.Message; } catch (Exception) { result = "Another error"; } } }
public SignUp(IFirebaseAuthenticator authenticator) { InitializeComponent(); firebaseAuthenticator = authenticator; UserEmail.TextChanged += UserEmail_TextChanged; UserPass.TextChanged += UserPass_TextChanged; ConfirmPass.Completed += ConfirmPass_Completed; SignUpButton.Clicked += SignUpButton_Clicked; }
public SignUpGym2(string nome, string citta, string indirizzo, string email, string password) { InitializeComponent(); App.nomeGym = nome; App.cittaGym = citta; App.indirizzoGym = indirizzo; App.emailGym = email; App.passwordGym = password; _auth = DependencyService.Get <IFirebaseAuthenticator>(); pictureModify(); }
public PalestraIscrizione(string uid) { Gym.uid = uid; InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); getInfo(uid); pictureFullScreen(); //PER POTERSI REGISTRARE ALLA PALESTRA CHE L'UTENTE STA VISUALIZZANDO //HO BISOGNO DEL SUO UID PER CAPIRE SE E' GIA' REGISTRATO O MENO string uidUser = App.uid; canUserRegister(uidUser); }
public LoginViewModel(IFirebaseAuthenticator firebaseAuthenticator) { this.FirebaseAuthenticator = firebaseAuthenticator; LoginCmd = new Command(async() => await Login(), () => Email.IsValid && Password.IsValid && !IsBusy); Email = new ValidatableObject <string>(PropChangedCallBack, new EmailValidator()) { Value = "*****@*****.**" }; Password = new ValidatableObject <string>(PropChangedCallBack, new PasswordValidator()) { Value = "123qwe" }; }
public App() { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); // MainPage = new NavigationPage(new home.profilo.AbbonamentoPopup()); string uid = Preferences.Get("uid", null); if (uid != null) { MainPage = new NavigationPage(new home.Home()); } else { MainPage = new NavigationPage(new Main()); } }
public LoginViewModel( IFirebaseAuthenticator firebaseAuthenticator, NavigationService navigationService) { this.firebaseAuthenticator = firebaseAuthenticator; this.navigationService = navigationService; LoginCmd = new Command(async() => await Login(), () => Email.IsValid && Password.IsValid && !IsBusy); Email = new ValidatableObject <string>(propChangedCallBack, new EmailValidator()) { Value = "*****@*****.**" }; Password = new ValidatableObject <string>(propChangedCallBack, new PasswordValidator()) { Value = "Qwerty123" }; }
public FindGymManually() { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); List <string> filtri = new List <string>(); filtri.Add("Nome"); filtri.Add("Citta"); pickerFilterFind.ItemsSource = filtri; pickerFilterFind.SelectedIndexChanged += async(sender, args) => { if (pickerFilterFind.SelectedIndex == -1) { } else { string colorName = pickerFilterFind.Items[pickerFilterFind.SelectedIndex]; pickerFilterFind.SelectedItem = -1; if (colorName.Equals("Nome")) { result.IsVisible = false; parameter.IsVisible = true; parameter.Placeholder = "Inserisci nome"; btnFindGymName.IsVisible = true; } else { result.IsVisible = false; parameter.IsVisible = true; parameter.Placeholder = "Inserisci città"; btnFindGymCity.IsVisible = true; } } }; }
public LogIn() { InitializeComponent(); auth = DependencyService.Get <IFirebaseAuthenticator>(); }
public RegisterPage() { InitializeComponent(); auth = DependencyService.Get <IFirebaseAuthenticator>(); }
public ResetPassword() { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); }
public OrariPopup(string uid) { _auth = DependencyService.Get <IFirebaseAuthenticator>(); InitializeComponent(); showTime(uid); }
public signUpGym() { InitializeComponent(); _auth = DependencyService.Get <IFirebaseAuthenticator>(); }