Пример #1
0
        public FoodTruckMap()
        {
            InitializeComponent();

            this.foodTruckMapViewModel = new FoodTruckMapViewModel();

            if (foodTruckMapViewModel.IsLocationAvailable() == false)
            {
                DisplayAlert("Alerta", "Por favor ative o GPS!", "OK");
            }
            this.userMap = foodTruckMapViewModel.CreateUserMap();

            MapArea.Children.Add(userMap);
            userMap.IsShowingUser = true;

            this.CreatePins();
        }
Пример #2
0
        public FoodTruckOwnerPage(FoodTruck foodTruck)
        {
            InitializeComponent();

            this.loggedFoodTruck             = new FoodTruckLoginViewModel().GetFoodTruck(foodTruck.Cnpj);
            this.foodTruckOwnerPageViewModel = new FoodTruckOwnerPageViewModel();
            this.foodTruckMapViewModel       = new FoodTruckMapViewModel();

            if (foodTruckMapViewModel.IsLocationAvailable() == false)
            {
                DisplayAlert("Alerta", "Por favor ative o GPS!", "OK");
            }
            this.userMap = foodTruckMapViewModel.CreateUserMap();

            MapArea.Children.Add(userMap);
            userMap.IsShowingUser = true;

            this.ChangeFoodTruckStatusButtonColor();
            this.CreatePins();
        }