Example #1
0
 public ConfigWizard(AppSettings settings, IConfigurationService configurationService, IEmulationService emulationService, IFileHelpers fileHelpers)
 {
     InitializeComponent();
     this.configurationService = configurationService;
     this.emulationService     = emulationService;
     this.settings             = settings;
     this.fileHelpers          = fileHelpers;
 }
 public EmulatorIdentificationService(AppSettings appSettings, IGameLibraryService gameLibraryService, ICoverService coverService, IEmulationService emulationService, IRemoteConfigService remoteConfigService,
                                      IFileHelpers fileHelpers, IProcessHelpers processHelpers) : base(gameLibraryService, coverService, remoteConfigService)
 {
     this.appSettings      = appSettings;
     this.emulationService = emulationService;
     this.fileHelpers      = fileHelpers;
     this.processHelpers   = processHelpers;
 }
Example #3
0
        public RemoteConfigService(AppSettings appSettings, FileIniDataParser iniParser, IConfigurationService configurationService, IEmulationService emulationService, IFileHelpers fileHelpers)
        {
            remoteConfigsPath         = appSettings.RemoteConfigsPath ?? "Remote";
            this.iniParser            = iniParser;
            this.configurationService = configurationService;
            this.emulationService     = emulationService;
            this.fileHelpers          = fileHelpers;
            remoteIndex = new XmlDocument();

            Task.Run(UpdateFromRemote).ContinueWith(task => remoteIndex.Load($"{remoteConfigsPath}\\RemoteIndex.xml"));
        }
        public GameSystemSelectionVM(IUserDialogs dialogsService, ILocalizationService localizationService, IPlatformService platformService, IEmulationService emulationService)
        {
            DialogsService      = dialogsService;
            LocalizationService = localizationService;
            PlatformService     = platformService;
            EmulationService    = emulationService;

            GameSystemSelectedCommand = new RelayCommand <GameSystemVM>(GameSystemSelected);

            EmulationService.CoresInitialized             += OnCoresInitialized;
            EmulationService.GameRuntimeExceptionOccurred += OnGameRuntimeExceptionOccurred;
        }
Example #5
0
        public GamePlayerVM(IPlatformService platformService, IEmulationService emulationService, ISaveStateService saveStateService)
        {
            PlatformService  = platformService;
            EmulationService = emulationService;
            SaveStateService = saveStateService;

            ShouldDisplayTouchGamepad = PlatformService.ShouldDisplayTouchGamepad;

            TappedCommand = new RelayCommand(() =>
            {
                DisplayPlayerUI = !DisplayPlayerUI;
            });

            PointerMovedCommand = new RelayCommand(() =>
            {
                PlatformService.ChangeMousePointerVisibility(MousePointerVisibility.Visible);
                LastPointerMoveTime = DateTimeOffset.UtcNow;
                DisplayPlayerUI     = true;
            });

            ToggleFullScreenCommand = new RelayCommand(() => RequestFullScreenChange(FullScreenChangeType.Toggle));

            TogglePauseCommand = new RelayCommand(() => { var task = TogglePause(false); }, () => CoreOperationsAllowed);
            ResetCommand       = new RelayCommand(Reset, () => CoreOperationsAllowed);
            StopCommand        = new RelayCommand(Stop, () => CoreOperationsAllowed);

            SaveStateSlot1 = new RelayCommand(() => SaveState(1), () => CoreOperationsAllowed);
            SaveStateSlot2 = new RelayCommand(() => SaveState(2), () => CoreOperationsAllowed);
            SaveStateSlot3 = new RelayCommand(() => SaveState(3), () => CoreOperationsAllowed);
            SaveStateSlot4 = new RelayCommand(() => SaveState(4), () => CoreOperationsAllowed);
            SaveStateSlot5 = new RelayCommand(() => SaveState(5), () => CoreOperationsAllowed);
            SaveStateSlot6 = new RelayCommand(() => SaveState(6), () => CoreOperationsAllowed);

            LoadStateSlot1 = new RelayCommand(() => LoadState(1), () => CoreOperationsAllowed);
            LoadStateSlot2 = new RelayCommand(() => LoadState(2), () => CoreOperationsAllowed);
            LoadStateSlot3 = new RelayCommand(() => LoadState(3), () => CoreOperationsAllowed);
            LoadStateSlot4 = new RelayCommand(() => LoadState(4), () => CoreOperationsAllowed);
            LoadStateSlot5 = new RelayCommand(() => LoadState(5), () => CoreOperationsAllowed);
            LoadStateSlot6 = new RelayCommand(() => LoadState(6), () => CoreOperationsAllowed);

            InjectInputCommand = new RelayCommand <InjectedInputTypes>(d => EmulationService.InjectInputPlayer1(d));

            AllCoreCommands = new RelayCommand[] { TogglePauseCommand, ResetCommand, StopCommand,
                                                   SaveStateSlot1, SaveStateSlot2, SaveStateSlot3, SaveStateSlot4, SaveStateSlot5, SaveStateSlot6,
                                                   LoadStateSlot1, LoadStateSlot2, LoadStateSlot3, LoadStateSlot4, LoadStateSlot5, LoadStateSlot6 };

            EmulationService.GameStarted += OnGameStarted;
            PlatformService.FullScreenChangeRequested   += (d, e) => RequestFullScreenChange(e.Type);
            PlatformService.PauseToggleRequested        += d => OnPauseToggleKey();
            PlatformService.GameStateOperationRequested += OnGameStateOperationRequested;
        }
        public GameSystemSelectionVM(IFileSystem fileSystem, IUserDialogs dialogsService, ILocalizationService localizationService, IPlatformService platformService, IEmulationService emulationService)
        {
            FileSystem          = fileSystem;
            DialogsService      = dialogsService;
            LocalizationService = localizationService;
            PlatformService     = platformService;
            EmulationService    = emulationService;

            GameSystemSelectedCommand = new RelayCommand <GameSystemVM>(GameSystemSelected);

            EmulationService.CoresInitialized             += OnCoresInitialized;
            EmulationService.GameRuntimeExceptionOccurred += OnGameRuntimeExceptionOccurred;
            EmulationService.GameStopped += d => { ResetSystemsSelection(); };

            ResetSystemsSelection();
        }
Example #7
0
        public MainWindow(AppSettings settings,
                          IGameLibraryService gameLibraryService, IEmulationService emulationService, IIdentificationService identificationService,
                          ICoverService coverService, IVersionManagementService versionManagementService, IFileHelpers fileHelpers)
        {
            InitializeComponent();
            this.settings                 = settings;
            this.gameLibraryService       = gameLibraryService;
            this.emulationService         = emulationService;
            this.identificationService    = identificationService;
            this.coverService             = coverService;
            this.versionManagementService = versionManagementService;
            this.fileHelpers              = fileHelpers;

            PopulateGameModelsFromLibrary();
            userSettingsModel        = new UserSettingsModel(settings.UserSettings);
            gamesList.ItemsSource    = gameModels;
            settingsMenu.DataContext = userSettingsModel;
        }
Example #8
0
 private void OnCoresInitialized(IEmulationService sender)
 {
     RaisePropertyChanged(nameof(FileDependencyImporters));
 }
Example #9
0
 public SettingsVM(IEmulationService emulationService)
 {
     EmulationService = emulationService;
     EmulationService.CoresInitialized += OnCoresInitialized;
 }
 private void OnGameRuntimeExceptionOccurred(IEmulationService sender, Exception e)
 {
     DisplayNotification(GameRunningFailAlertTitleKey, GameRunningFailAlertMessageKey);
 }
 private void OnCoresInitialized(IEmulationService sender)
 {
     RaisePropertyChanged(nameof(GameSystems));
 }
 private void OnCoresInitialized(IEmulationService sender)
 {
     GameSystems = EmulationService.Systems;
 }
 private void OnGameStarted(IEmulationService sender)
 {
     GameIsPaused = false;
 }