private void buttonRomsPathBrowse_Click(object sender, RoutedEventArgs e) { string path = CommonDialogsHelper.ShowFolderBrowseDialog( "Select ROMs Folder Path:", this.Config.RomsFolderPath); if (!String.IsNullOrEmpty(path)) { this.Config.RomsFolderPath = path; } }
private void buttonAddGameConfig_Click(object sender, RoutedEventArgs e) { string gameConfig = CommonDialogsHelper.ShowInputTextBoxDialog(this, "Enter Game Config File Name:", "Add Game Config", "TODO.config"); if (!String.IsNullOrEmpty(gameConfig)) { this.PlatformConfig.GameConfigs.Add(gameConfig); UpdateGameConfigs(); listGameConfigs.SelectedItem = gameConfig; } }
private void buttonAddEmulator_Click(object sender, RoutedEventArgs e) { string emulator = CommonDialogsHelper.ShowInputTextBoxDialog(this, "Enter Emulator Name:", "Add Game Config"); if (!String.IsNullOrEmpty(emulator)) { this.PlatformConfig.Emulators.Add(emulator); UpdateEmulators(); listEmulators.SelectedItem = emulator; } }
private void buttonAddSyncSelection_Click(object sender, RoutedEventArgs e) { Platform?platform = (Platform?)CommonDialogsHelper.ShowInputComboBoxDialog(this, "Select Sync Platform:", EnumHelper.EnumToList <Platform>(), "Add Sync Selection", null, true); if (platform.HasValue) { this.Device.SyncPlatformSelections.Add(platform.Value); UpdateSyncSelections(); listSyncSelections.SelectedItem = platform.Value; } }
private async Task <CatalogConfig> LoadConfigAsync() { string configFolderPath = ReflectionHelper.GetExecutingAssemblyFolderPath(); var accessProcessor = new LocalAccessProvider(); var config = await Config.LoadAsync <CatalogConfig>(accessProcessor, configFolderPath); if (config == null) { string romsFolderPath = CommonDialogsHelper.ShowFolderBrowseDialog( "Select the location of your ROMs folder:"); if (!String.IsNullOrEmpty(romsFolderPath)) { config = new CatalogConfig(accessProcessor, configFolderPath, romsFolderPath); await config.SaveAsync(); } } return(config); }