public LoginViewModel() { this.displayAlertService = new DisplayAlertService(); this.Email = "*****@*****.**"; this.Password = "******"; }
public DetailsProductViewModel() { var ok = new DisplayAlertAction("Ok", async() => { await NavigationService.GoAsync <MainViewModel>(); }); AddToCartCommand = new ViewModelCommand(this, async() => { await DisplayAlertService.DisplayAlertAsync("Products Show Case", $"Product {Product.Name} added successfully", ok); }); }
public RegisterViewModel() { this.displayAlertService = new DisplayAlertService(); //this.ImageSource = "no_image";+ this.BirthdayDate = System.DateTime.Now; this.TrainingPlanList = new ObservableCollection <TrainingPlanModel>(); this.LoadTrainingPlans(); }
public ProductsViewModel() { Title = "Products"; RefreshCommand = new ViewModelCommand(this, () => { Products.Add(new Model.Product { Id = Products.Count + 1, Name = DateTime.Now.ToString(), Image = "monkey.png", Price = Products.Count + 1 }); }); AddToCartCommand = new ViewModelCommand <Model.Product>(this, async(product) => { var ok = new DisplayAlertAction("Ok", async() => { await NavigationService.GoAsync <MainViewModel>(); }); await DisplayAlertService.DisplayAlertAsync("Product Show Case", $"Product {product.Name} added successfully", ok); }); }
public void OnErroAoAutenticarUsuario(ViewModelBase sender, Exception execption) { Microsoft.AppCenter.Crashes.Crashes.TrackError(execption); DisplayAlertService.DisplayAlertAsync("Facebook Login", execption.Message, new DisplayAlertAction("OK")); }