Пример #1
0
        public LoginViewModel()
        {
            this.displayAlertService = new DisplayAlertService();

            this.Email    = "*****@*****.**";
            this.Password = "******";
        }
Пример #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);
            });
        }
Пример #3
0
        public RegisterViewModel()
        {
            this.displayAlertService = new DisplayAlertService();
            //this.ImageSource = "no_image";+

            this.BirthdayDate = System.DateTime.Now;

            this.TrainingPlanList = new ObservableCollection <TrainingPlanModel>();
            this.LoadTrainingPlans();
        }
Пример #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);
            });
        }
Пример #5
0
        public void OnErroAoAutenticarUsuario(ViewModelBase sender, Exception execption)
        {
            Microsoft.AppCenter.Crashes.Crashes.TrackError(execption);

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