Exemple #1
0
 public ConfigurationViewModel()
 {
     this.guests = 1;
     this.BookHotelRoomCommand             = new Command(this.BookHotelRoom, this.CanBookHotelRoom);
     this.CheckInDate                      = null;
     this.CheckOutDate                     = null;
     this.datePickerConfigurationViewModel = new PickerConfigurationMenuViewModel();
 }
Exemple #2
0
 public ConfigurationViewModel()
 {
     this.availableGenres = new List <Genre>()
     {
         new Genre("Crime", "#9760FE"),
         new Genre("Drama", "#B73562"),
         new Genre("Epics", "#FE6078")
     };
     this.availableMovies = new List <Movie>()
     {
         new Movie("The Godfather",
                   "Al Pacino, Marlon Brando, James Caan",
                   "The Godfather is a 1972 American crime film directed by Francis Ford Coppola...",
                   new TimeSpan(0, 45, 0),
                   this.availableGenres[0]),
         new Movie("The Shawshank Redemption",
                   "Morgarn Freeman, Rita Hayworth, Tim Robbins",
                   "The Shawshank Redemption is a 1994 American drama film written and directed by Frank Darabont...",
                   new TimeSpan(1, 30, 0),
                   this.availableGenres[1]),
         new Movie("Star Wars",
                   "Harrison Ford, Carrie Fisher, Mark Hamill",
                   "Star Wars is a 1977 American epic space opera film written and directed by George Lucas...",
                   new TimeSpan(2, 15, 0),
                   this.availableGenres[2]),
         new Movie("The Lord of the Rings",
                   "Elijah Wood, Ian McKellen, Orlando Bloom",
                   "A meek Hobbit from the Shire and eight companions set out on a journey to destroy the powerful One Ring and save Middle-earth from the Dark Lord Sauron.",
                   new TimeSpan(3, 45, 0),
                   this.availableGenres[2]),
         new Movie("Rocky",
                   "Sylvester Stallone, Talia Shire, Burt Young",
                   "A small-time boxer gets a supremely rare chance to fight a heavy-weight champion in a bout in which he strives to go the   distance     for     his self-respect.",
                   new TimeSpan(4, 30, 0),
                   this.availableGenres[1])
     };
     this.Movies            = new ObservableCollection <Movie>(this.availableMovies);
     this.MaximumTime       = new TimeSpan(3, 59, 59);
     this.FindMoviesCommand = new Command(this.FindMovies, this.CanFindMovies);
     this.SearchLabelText   = "All Movies:";
     this.timeSpanPickerConfigurationViewModel = new PickerConfigurationMenuViewModel();
 }
 public ConfigurationViewModel()
 {
     this.Alarms = new ObservableCollection <Alarm>
     {
         new Alarm()
         {
             SelectedHour = new TimeSpan(6, 0, 0)
         },
         new Alarm()
         {
             SelectedHour = new TimeSpan(7, 0, 0)
         },
         new Alarm()
         {
             SelectedHour = new TimeSpan(8, 0, 0), IsEnabled = true
         },
     };
     this.AddAlarmCommand = new Command(this.AddAlarm);
     this.timePickerConfigurationViewModel = new PickerConfigurationMenuViewModel();
 }
        public ConfigurationViewModel()
        {
            this.Product = new ProductViewModel
            {
                Name        = "Kuako Womens Trainers",
                Description = "Comfort running shoes using air cushion design.",
                Image       = "Picker_Demo1_Header.png",
                Price       = 230
            };

            this.Colors = new ObservableCollection <ColorViewModel>
            {
                new ColorViewModel("Purple", "#AE3C63"),
                new ColorViewModel("Black", "#000000"),
                new ColorViewModel("Azure Blue", "#316FC8"),
                new ColorViewModel("Grey", "#CCCCCC"),
                new ColorViewModel("Light Blue", "#6FA2DC"),
                new ColorViewModel("Light Green", "#9CCC65"),
                new ColorViewModel("Blue", "#42A5F5"),
                new ColorViewModel("Yellow", "#FFEE58"),
                new ColorViewModel("Red", "#EE534F"),
                new ColorViewModel("Orange", "#FFA726"),
                new ColorViewModel("Brown", "#8D6E63"),
            };

            this.Sizes = new ObservableCollection <double>
            {
                5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10
            };

            this.AddToCartCommand = new Command(this.ExecuteAddToCartCommand, this.CanExecuteAddToCartCommand);

            this.Color    = this.Colors[defaultColorIndex];
            this.Size     = this.Sizes[defaultSizeIndex];
            this.Quantity = 1;
            this.timePickerConfigurationViewModel = new PickerConfigurationMenuViewModel();
        }
        public ConfigurationViewModel()
        {
            this.OriginAcceptCommand      = new Command(this.OnExecuteOriginAcceptCommand);
            this.OriginCancelCommand      = new Command(this.OnExecuteOriginCancelCommand);
            this.DestinationAcceptCommand = new Command(this.OnExecuteDestinationAcceptCommand);
            this.DestinationCancelCommand = new Command(this.OnExecuteDestinationCancelCommand);
            this.SelectFlightCommand      = new Command(this.OnExecuteSelectFlightCommand, this.CanExecuteSelectFlightCommand);

            this.Countries = new ObservableCollection <Country>
            {
                new Country
                {
                    Name   = "Austria",
                    Cities =
                    {
                        new City
                        {
                            Name = "Graz"
                        },
                        new City
                        {
                            Name = "Innsbruck"
                        },
                        new City
                        {
                            Name = "Linz"
                        },
                        new City
                        {
                            Name = "Ratz"
                        },
                        new City
                        {
                            Name = "Salzburg"
                        },
                        new City
                        {
                            Name = "Vienna"
                        },
                        new City
                        {
                            Name = "Wolfsberg"
                        },
                        new City
                        {
                            Name = "Zeltweg"
                        }
                    }
                },
                new Country
                {
                    Name   = "Belgium",
                    Cities =
                    {
                        new City
                        {
                            Name = "Antwerp"
                        },
                        new City
                        {
                            Name = "Assesse"
                        },
                        new City
                        {
                            Name = "Bruges"
                        },
                        new City
                        {
                            Name = "Charleroi"
                        },
                        new City
                        {
                            Name = "Lint"
                        },
                        new City
                        {
                            Name = "Ranst"
                        },
                        new City
                        {
                            Name = "Schaffen"
                        },
                        new City
                        {
                            Name = "Veurne"
                        },
                        new City
                        {
                            Name = "Zingem"
                        },
                    }
                },
                new Country
                {
                    Name   = "Denmark",
                    Cities =
                    {
                        new City
                        {
                            Name = "Aalborg"
                        },
                        new City
                        {
                            Name = "Aarhus"
                        },
                        new City
                        {
                            Name = "Billund"
                        },
                        new City
                        {
                            Name = "Copenhagen"
                        },
                        new City
                        {
                            Name = "Karup"
                        },
                        new City
                        {
                            Name = "Odense"
                        },
                        new City
                        {
                            Name = "Viborg"
                        },
                        new City
                        {
                            Name = "Vojens"
                        }
                    }
                },
                new Country
                {
                    Name   = "France",
                    Cities =
                    {
                        new City
                        {
                            Name = "Aurillac"
                        },
                        new City
                        {
                            Name = "Belley"
                        },
                        new City
                        {
                            Name = "Bourg-en-Bresse"
                        },
                        new City
                        {
                            Name = "Carcassonne"
                        },
                        new City
                        {
                            Name = "Caen"
                        },
                        new City
                        {
                            Name = "Deauville"
                        },
                        new City
                        {
                            Name = "La Rochelle"
                        },
                        new City
                        {
                            Name = "Nice"
                        },
                        new City
                        {
                            Name = "Marseille"
                        },
                        new City
                        {
                            Name = "Paris - Val-De-Marne"
                        },
                        new City
                        {
                            Name = "Paris - Val d'Oise"
                        },
                        new City
                        {
                            Name = "Rodez"
                        }
                    }
                },
                new Country
                {
                    Name   = "Germany",
                    Cities =
                    {
                        new City
                        {
                            Name = "Baden-Baden"
                        },
                        new City
                        {
                            Name = "Berlin"
                        },
                        new City
                        {
                            Name = "Borkum"
                        },
                        new City
                        {
                            Name = "Bremen"
                        },
                        new City
                        {
                            Name = "Dortmund"
                        },
                        new City
                        {
                            Name = "Dresden"
                        },
                        new City
                        {
                            Name = "Hamburg"
                        },
                        new City
                        {
                            Name = "Hannover"
                        },
                        new City
                        {
                            Name = "Leipzig"
                        },
                        new City
                        {
                            Name = "Mannheim"
                        },
                        new City
                        {
                            Name = "Munich"
                        },
                        new City
                        {
                            Name = "Nuremberg"
                        }
                    }
                },
                new Country
                {
                    Name   = "Italy",
                    Cities =
                    {
                        new City
                        {
                            Name = "Aosta"
                        },
                        new City
                        {
                            Name = "Bari"
                        },
                        new City
                        {
                            Name = "Bologna"
                        },
                        new City
                        {
                            Name = "Parma"
                        },
                        new City
                        {
                            Name = "Rimini"
                        },
                        new City
                        {
                            Name = "Rome - Fiumicino"
                        },
                        new City
                        {
                            Name = "Rome - Ciampino"
                        }
                    }
                },
                new Country
                {
                    Name   = "Netherlands",
                    Cities =
                    {
                        new City
                        {
                            Name = "Amsterdam"
                        },
                        new City
                        {
                            Name = "Bonaire"
                        },
                        new City
                        {
                            Name = "Eindhoven"
                        },
                        new City
                        {
                            Name = "Maastricht"
                        },
                        new City
                        {
                            Name = "Rotterdam"
                        }
                    }
                },
                new Country
                {
                    Name   = "Portugal",
                    Cities =
                    {
                        new City
                        {
                            Name = "Braga"
                        },
                        new City
                        {
                            Name = "Cascais"
                        },
                        new City
                        {
                            Name = "Lisbon"
                        },
                        new City
                        {
                            Name = "Porto"
                        }
                    }
                },
                new Country
                {
                    Name   = "Spain",
                    Cities =
                    {
                        new City
                        {
                            Name = "Alicante"
                        },
                        new City
                        {
                            Name = "Barcelona"
                        },
                        new City
                        {
                            Name = "Madrid"
                        },
                        new City
                        {
                            Name = "Seville"
                        },
                        new City
                        {
                            Name = "Valencia"
                        },
                        new City
                        {
                            Name = "Zaragoza"
                        }
                    }
                },
                new Country
                {
                    Name   = "United Kingdom",
                    Cities =
                    {
                        new City
                        {
                            Name = "Bristol Airport"
                        },
                        new City
                        {
                            Name = "Castle Donington"
                        },
                        new City
                        {
                            Name = "Liverpool"
                        },
                        new City
                        {
                            Name = "London City Airport"
                        },
                        new City
                        {
                            Name = "London Luton"
                        },
                        new City
                        {
                            Name = "Manchester Airport"
                        },
                        new City
                        {
                            Name = "Norwich"
                        },
                        new City
                        {
                            Name = "Southampton"
                        }
                    }
                },
            };
            this.Adults   = 1;
            this.Children = 0;
            this.templatedPickerConfigurationViewModel = new PickerConfigurationMenuViewModel();
        }
 public ConfigurationViewModel()
 {
     this.dateTimePickerConfigurationViewModel = new PickerConfigurationMenuViewModel();
     this.dateTimePickerConfigurationViewModel.IsHeaderVisible = false;
     this.SelectDateCommand = new Command(this.SelectDate, this.CanExecuteSelectDate);
 }