コード例 #1
0
        public MovieLoader()
        {
            movies = new MovieList();
            premieres = new MovieList();
            movies.Add(CreateHungerGames());
            movies.Add(CreateTheSmurfs());
            movies.Add(CreateThor());
            movies.Add(CreateHobbit());
            movies.Add(CreateKhumba());
            movies.Add(CreateAboutTime());
            movies.Add(CreateRunner());
            movies.Add(CreateFreeBirds());
            movies.Add(CreateCounselor());
            movies.Add(CreateCarrie());
            movies.Add(CreateDespicableMe());
            movies.Add(CreateBattleOfTheYear());

            for (int i = 0; i < movies.Count; i++)
            {
                if (movies[i].IsPremiere)
                {
                    premieres.Add(movies[i]);
                }
            }

            randomTime = new Random(DateTime.Now.Millisecond);
        }
コード例 #2
0
        private void reserveButton_Click(object sender, RoutedEventArgs e)
        {
            MovieList aMovie = new MovieList();
            aMovie.Add(this.Movie);
            ShowList ShowsForMovie = new ShowList(aMovie, this.ShowList.Halls);
            for (int i = 0; i < this.ShowList.Count(); i++)
            {
                if (this.ShowList[i].Movie == this.Movie)
                {
                    ShowsForMovie.Add(ShowList[i]);
                }
            }

            ProgramWindow window = new ProgramWindow(ShowsForMovie);
            window.Show();
        }