Exemplo n.º 1
0
        public MainViewModel()
        {
            //MakeGamesBiggerCommand = new CommandRunner(MakeBigger);
            SearchForGamesText = "Search for a game";
            GameGenresCBX      = new ObservableCollection <string>
            {
                "All Genres",
                "----------------------------------------",
                "FPS",
                "RPG",
                "ACTION",
                "ADVENTURE",
                "HORROR",
                "RACING"
            };
            //Properties.Settings.Default.Reset();
            CloseSettingsCommand = new CommandRunner(CloseSettings);
            //FirstTimeConfiguration();
            ScanGamesCommand              = new CommandRunner(ScanGames);
            AddFolderPathCommand          = new CommandRunner(AddDir);
            DeleteFolderPathCommand       = new CommandRunner(DeleteDir);
            FilterGamesCommand            = new CommandRunner(FilterGamesByPlatform);
            ResetAllSettingsCommand       = new CommandRunner(ResetAllSettings);
            PassSelectedGameToViewCommand = new CommandRunner(PassSelectedGameToGameDetailedViewModel);
            Scanner = new GameScanner();
            Scanner.Scan();
            Games = Scanner.GetExecutables();

            //SGDBAPIController = new SGDBAPIController(Games);
            //PickRandomWideGameCover();

            GamesFoundText = string.Format($"We found {Games.Count.ToString()} games installed on your system.");
            MyProperty     = Scanner.GetExecutables();
            FilteredGames  = CollectionViewSource.GetDefaultView(Games);
            //APIController = new IGDBAPIController(Games);
            //TEST();
            ImageHeight = 208;
            ImageWidth  = 400;
        }