public RlAuditMediaViewModelBase(IEventAggregator ea, IHyperspinManager hyperspinManager, IGameLaunch gameLaunch,
                                         ISettingsHypermint settings,
                                         ISelectedService selected, IRlScan rlScan, IDialogCoordinator dialogService)
        {
            _eventAggregator  = ea;
            _hyperspinManager = hyperspinManager;
            _selectedService  = selected;
            _settings         = settings;
            _dialogService    = dialogService;
            _rlScan           = rlScan;

            //Setup the games list.
            GamesList = new ListCollectionView(_hyperspinManager.CurrentSystemsGames);
            GamesList.CurrentChanged += GamesList_CurrentChanged;

            CurrentCellChanged = new DelegateCommand <object>(selectedGameCell => { OnCurrentCellChanged(selectedGameCell); });

            ScanRlMediaCommand = new DelegateCommand(async() => await ScanForMedia());

            LaunchRlMode = new DelegateCommand <string>((x) =>
            {
                gameLaunch.RocketLaunchGameWithMode(
                    settings.HypermintSettings.RlPath,
                    selected.CurrentSystem, selected.CurrentRomname, x);
            });

            OpenScanRocketMediaFolderCommand = new DelegateCommand <string>(OpenScanRocketMediaFolderAsync);
        }
        public RlDefaultAuditViewModel(IEventAggregator ea, IHyperspinManager hyperspinManager, IGameLaunch gameLaunch, ISettingsHypermint settings, ISelectedService selected, IRlScan rlScan, IDialogCoordinator dialogService) : base(ea, hyperspinManager, gameLaunch, settings, selected, rlScan, dialogService)
        {
            _rlScan   = rlScan;
            _settings = settings;
            _selected = selected;

            DefaultFolders = new ObservableCollection <RlAudit>();

            ScanDefaultsCommand = new DelegateCommand(async() => await ScanForMedia());
        }
        public RlScanMediaFolderViewModel(string rlMediaFolder, string hsFolder, string mediaFolderName, string systemName,
                                          IDialogCoordinator dialogService, CustomDialog customDialog, IEnumerable <Game> gamesList, IRlScan rlScan)
        {
            _games  = gamesList;
            _rlScan = rlScan;

            CurrentMediaFolder = Path.Combine(rlMediaFolder, mediaFolderName, systemName);

            //Collection views
            UnmatchedFolders     = new ObservableCollection <UnMatchedFolder>();
            CurrentGames         = new ObservableCollection <TempGame>();
            GamesFolders         = new ListCollectionView(CurrentGames);
            UnmatchedFoldersView = new ListCollectionView(UnmatchedFolders);

            ClearMatchedCommand = new DelegateCommand(() =>
            {
                var folders = UnmatchedFolders.Where(x => !string.IsNullOrWhiteSpace(x.RecommendedName));
                foreach (var folder in folders)
                {
                    folder.RecommendedName = string.Empty;
                    folder.Rename          = false;
                }
            });
            CloseCommand = new DelegateCommand(async() =>
            {
                await dialogService.HideMetroDialogAsync(this, customDialog);
            });
            MatchFoldersCommand = new DelegateCommand(async() =>
            {
                await MatchFoldersAsync();
            });
            RenameCommand = new DelegateCommand(() =>
            {
                RenameUnmatchedFolders();
            });
            ScanForMappedFoldersCommand = new DelegateCommand(async() => await LoadAndScanFolders());
        }
Beispiel #4
0
 public RlFadeAuditViewModel(IEventAggregator ea, IHyperspinManager hyperspinManager, IGameLaunch gameLaunch, ISettingsHypermint settings, ISelectedService selected, IRlScan rlScan, IDialogCoordinator dialogService) : base(ea, hyperspinManager, gameLaunch, settings, selected, rlScan, dialogService)
 {
     _rlScan   = rlScan;
     _settings = settings;
 }