Ejemplo n.º 1
0
        public LoginViewModel()
        {
            this.displayAlertService = new DisplayAlertService();

            this.Email    = "*****@*****.**";
            this.Password = "******";
        }
Ejemplo n.º 2
0
        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);
            });
        }
Ejemplo n.º 3
0
        public RegisterViewModel()
        {
            this.displayAlertService = new DisplayAlertService();
            //this.ImageSource = "no_image";+

            this.BirthdayDate = System.DateTime.Now;

            this.TrainingPlanList = new ObservableCollection <TrainingPlanModel>();
            this.LoadTrainingPlans();
        }
Ejemplo n.º 4
0
        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);
            });
        }
Ejemplo n.º 5
0
        public void OnErroAoAutenticarUsuario(ViewModelBase sender, Exception execption)
        {
            Microsoft.AppCenter.Crashes.Crashes.TrackError(execption);

            DisplayAlertService.DisplayAlertAsync("Facebook Login", execption.Message, new DisplayAlertAction("OK"));
        }