Exemplo n.º 1
0
        // GET: Movie
        public ActionResult Index()
        {
            movieViewModel        = new MovieDisplayViewModel();
            performancesViewModel = new PerformancesViewModel();
            posterViewModel       = new PosterViewModel();
            pricingViewModel      = new PricingViewModel();
            posterURLs            = new List <string>();
            movieInfo             = new Dictionary <PerformancesViewModel, MovieDisplayViewModel>();

            //used in GetShows
            showsToday  = new List <ShowingsViewModel>();
            showsToday2 = new List <ShowingsViewModel>();

            pricingList = pricingViewModel.GetPricing();

            //obtain performances for today
            IList <PerformancesViewModel> allPerfs = performancesViewModel.GetPerformancesToday();
            //sort by auditorium number
            IList <PerformancesViewModel> allPerfsSorted = allPerfs.OrderBy(x => x.auditorium).ToList();

            //find movies for running shows
            posterURLs = posterViewModel.GetPosters(allPerfs);

            GetShows(allPerfsSorted);

            //asign data to ViewData
            ViewData["posters"]       = posterURLs;
            ViewData["pricing"]       = pricingList;
            ViewData["performances"]  = showsToday;
            ViewData["performances2"] = showsToday2;

            return(View());
        }
Exemplo n.º 2
0
 public void PosterViewActive()
 {
     posterViewModel = new PosterViewModel();
     posterViewModel.LoadGames();
     posterViewModel.LoadGenres();
     DataContext = posterViewModel;
 }
Exemplo n.º 3
0
        public MainWindow()
        {
            LoadAllGames lag = new LoadAllGames();

            LoadSettings();
            MakeDirectories();
            MakeDefaultGenres();
            lag.LoadGenres();
            DeleteWorkingDirContents();
            InitializeComponent();
            posterViewModel = new PosterViewModel();
            posterViewModel.LoadGames();
            posterViewModel.LoadGenres();
            DataContext = posterViewModel;
        }
Exemplo n.º 4
0
        public ImageDownload(string gametitle, string searchstring, string imagetype)
        {
            id = this;
            int offset = 0;

            ImageType = imagetype;
            PosterViewModel pvm = new PosterViewModel();

            pvm.LoadSearch(gametitle, imagetype, searchstring, offset);
            InitializeComponent();
            if (Settings.Default.theme.ToString() == "Dark")
            {
                ThemeAssist.SetTheme(this, BaseTheme.Dark);
            }
            else if (Settings.Default.theme.ToString() == "Light")
            {
                ThemeAssist.SetTheme(this, BaseTheme.Light);
            }
            DownloadGrid.Height = ((MainWindow)Application.Current.MainWindow).ActualHeight * 0.8;
            DownloadGrid.Width  = ((MainWindow)Application.Current.MainWindow).ActualWidth * 0.8;
            windowTitle.Text    = searchstring.ToUpperInvariant();
        }
 public EdicaoPosterCommand(PosterViewModel posterVM)
 {
     _posterVM = posterVM;
 }