public ReviewViewer(IPlayniteAPI api) : base(api) { settings = new ReviewViewerSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; AddCustomElementSupport(new AddCustomElementSupportArgs { SourceName = "ReviewViewer", ElementList = new List <string> { "ReviewsControl" } }); AddSettingsSupport(new AddSettingsSupportArgs { SourceName = "ReviewViewer", SettingsRoot = $"{nameof(settings)}.{nameof(settings.Settings)}" }); steamApiLanguage = "english"; if (settings.Settings.UseMatchingSteamApiLang) { steamApiLanguage = GetSteamApiMatchingLanguage(PlayniteApi.ApplicationSettings.Language); } }
public PlayState(IPlayniteAPI api) : base(api) { settings = new PlayStateSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; SetExclusionList(); stopwatchList = new List <Tuple <Guid, Stopwatch> >(); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(1000); timer.Tick += (src, args) => { timer.Stop(); if (currentSplashWindow != null) { currentSplashWindow.Hide(); currentSplashWindow.Topmost = false; } }; splashWindowViewModel = new SplashWindowViewModel(); }
public GamesSizeCalculator(IPlayniteAPI api) : base(api) { settings = new GamesSizeCalculatorSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = false }; }
public SteamDescriptionCleaner(IPlayniteAPI api) : base(api) { settings = new SteamDescriptionCleanerSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = false }; }
public SteamLauncherUtility(IPlayniteAPI api) : base(api) { settings = new SteamLauncherUtilitySettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; }
public SteamGameTransferUtility(IPlayniteAPI api) : base(api) { settings = new SteamGameTransferUtilitySettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = false }; }
public _name_(IPlayniteAPI api) : base(api) { settings = new _name_SettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; }
public ResolutionChanger(IPlayniteAPI api) : base(api) { settings = new ResolutionChangerSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; }
public GamePassCatalogBrowser(IPlayniteAPI api) : base(api) { settings = new GamePassCatalogBrowserSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; }
public SplashScreen(IPlayniteAPI api) : base(api) { settings = new SplashScreenSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; }
public DescriptionEditor(IPlayniteAPI api) : base(api) { Properties = new GenericPluginProperties { HasSettings = false }; // Add Event for WindowBase for get the "WindowGameEdit". EventManager.RegisterClassHandler(typeof(Window), Window.LoadedEvent, new RoutedEventHandler(WindowBase_LoadedEvent)); }
public NVIDIAGeForceNowEnabler(IPlayniteAPI api) : base(api) { settings = new NVIDIAGeForceNowEnablerSettingsViewModel(this); geforceNowWorkingPath = Path.Combine(Environment.GetEnvironmentVariable("LocalAppData"), "NVIDIA Corporation", "GeForceNOW", "CEF"); geforceNowExecutablePath = Path.Combine(geforceNowWorkingPath, "GeForceNOWStreamer.exe"); Properties = new GenericPluginProperties { HasSettings = true }; }
public SimpleGameImport(IPlayniteAPI api) : base(api) { Settings = new SimpleGameImportSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; PluginFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); Localization.SetPluginLanguage(PluginFolder, api.ApplicationSettings.Language); }
public InstallationStatusUpdater(IPlayniteAPI api) : base(api) { settings = new InstallationStatusUpdaterSettingsViewModel(this, PlayniteApi); Properties = new GenericPluginProperties { HasSettings = true }; SetDirWatchers(); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(5000); timer.Tick += new EventHandler(Timer_Tick); }
public ExtraMetadataLoader(IPlayniteAPI api) : base(api) { settings = new ExtraMetadataLoaderSettingsViewModel(this, PlayniteApi); Properties = new GenericPluginProperties { HasSettings = true }; AddCustomElementSupport(new AddCustomElementSupportArgs { ElementList = new List <string> { "VideoLoaderControl", "VideoLoaderControlAlternative", "LogoLoaderControl" }, SourceName = "ExtraMetadataLoader", }); AddSettingsSupport(new AddSettingsSupportArgs { SourceName = "ExtraMetadataLoader", SettingsRoot = $"{nameof(settings)}.{nameof(settings.Settings)}" }); extraMetadataHelper = new ExtraMetadataHelper(PlayniteApi); logosDownloader = new LogosDownloader(PlayniteApi, settings.Settings, extraMetadataHelper); videosDownloader = new VideosDownloader(PlayniteApi, settings.Settings, extraMetadataHelper); PlayniteApi.Database.Games.ItemCollectionChanged += (sender, ItemCollectionChangedArgs) => { foreach (var removedItem in ItemCollectionChangedArgs.RemovedItems) { // Removed Game items have their ExtraMetadataDirectory deleted for cleanup extraMetadataHelper.DeleteExtraMetadataDir(removedItem); } }; PlayniteApi.Database.Platforms.ItemCollectionChanged += (sender, ItemCollectionChangedArgs) => { foreach (var removedItem in ItemCollectionChangedArgs.RemovedItems) { // Removed Platform items have their ExtraMetadataDirectory deleted for cleanup extraMetadataHelper.DeleteExtraMetadataDir(removedItem); } }; PlayniteApi.Database.Sources.ItemCollectionChanged += (sender, ItemCollectionChangedArgs) => { foreach (var removedItem in ItemCollectionChangedArgs.RemovedItems) { // Removed Source items have their ExtraMetadataDirectory deleted for cleanup extraMetadataHelper.DeleteExtraMetadataDir(removedItem); } }; }
public SplashScreen(IPlayniteAPI api) : base(api) { settings = new SplashScreenSettingsViewModel(this, PlayniteApi, GetPluginUserDataPath()); Properties = new GenericPluginProperties { HasSettings = true }; //Used for SendKeys workaround to prevent missing input when closing game in FS mode //A timer is used to ensure that Playnite is focused by the time the keys are sent, otherwise the fix //won't work sometimes timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(1500); timer.Tick += new EventHandler(SendKeysFix); }
public TestPlugin(IPlayniteAPI api) : base(api) { Properties = new GenericPluginProperties { HasSettings = true }; Settings = new TestPluginSettingsViewModel(this, api); AddCustomElementSupport(new AddCustomElementSupportArgs { ElementList = new List <string> { "TestUserControl" }, SourceName = "TestPlugin", }); AddSettingsSupport(new AddSettingsSupportArgs { SourceName = "TestPlugin", SettingsRoot = $"{nameof(Settings)}.{nameof(Settings.Settings)}" }); }
public ExtraMetadataLoader(IPlayniteAPI api) : base(api) { settings = new ExtraMetadataLoaderSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; AddCustomElementSupport(new AddCustomElementSupportArgs { ElementList = new List <string> { "VideoLoaderControl", "LogoLoaderControl" }, SourceName = "ExtraMetadataLoader", }); AddSettingsSupport(new AddSettingsSupportArgs { SourceName = "ExtraMetadataLoader", SettingsRoot = $"{nameof(settings)}.{nameof(settings.Settings)}" }); }
public InstallationStatusUpdater(IPlayniteAPI api) : base(api) { settings = new InstallationStatusUpdaterSettingsViewModel(this, PlayniteApi); Properties = new GenericPluginProperties { HasSettings = true }; SetDirWatchers(); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(5000); timer.Tick += new EventHandler(Timer_Tick); if (settings.Settings.UpdateStatusOnUsbChanges) { currentDevices = GetUSBDevices(); usbSearchertimer = new DispatcherTimer(); usbSearchertimer.Interval = TimeSpan.FromMilliseconds(5000); usbSearchertimer.Tick += new EventHandler(UsbTimer_Tick); usbSearchertimer.Start(); } }
public GameSpeak(IPlayniteAPI api) : base(api) { try { Settings = new GameSpeakSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; Speak = new System.Speech.Synthesis.SpeechSynthesizer(); pluginFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); Localization.SetPluginLanguage(pluginFolder, api.ApplicationSettings.Language); } catch (Exception E) { logger.Error(E, "GameSpeak()"); PlayniteApi.Dialogs.ShowErrorMessage(E.ToString(), Constants.AppName); } }
public CooperativeModesImporter(IPlayniteAPI api) : base(api) { settings = new CooperativeModesImporterSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true }; databaseZipPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "database.zip"); databasePath = Path.Combine(GetPluginUserDataPath(), "database.json"); specIdToSystemDictionary = new Dictionary <string, string> { //{ "3do", string.Empty }, //{ "adobe_flash", string.Empty }, //{ "amstrad_cpc", string.Empty }, //{ "apple_2", string.Empty }, //{ "bandai_wonderswan", string.Empty }, //{ "bandai_wonderswan_color", string.Empty }, //{ "coleco_vision", string.Empty }, //{ "commodore_64", string.Empty }, //{ "commodore_amiga", string.Empty }, //{ "commodore_amiga_cd32", string.Empty }, //{ "commodore_pet", string.Empty }, //{ "commodore_plus4", string.Empty }, //{ "commodore_vci20", string.Empty }, //{ "macintosh", string.Empty }, //{ "nintendo_virtualboy", string.Empty }, //{ "pc_linux", string.Empty }, //{ "sega_gamegear", string.Empty }, //{ "sega_mastersystem", string.Empty }, //{ "sinclair_zx81", string.Empty }, //{ "sinclair_zxspectrum", string.Empty }, //{ "sinclair_zxspectrum3", string.Empty }, //{ "snk_neogeo_cd", string.Empty }, //{ "snk_neogeopocket", string.Empty }, //{ "snk_neogeopocket_color", string.Empty }, //{ "vectrex", string.Empty }, { "atari_2600", "ATA" }, { "atari_5200", "ATA" }, { "atari_7800", "ATA" }, { "atari_8bit", "ATA" }, { "atari_jaguar", "JAG" }, { "atari_lynx", "ATA" }, { "atari_st", "ATA" }, { "mattel_intellivision", "INT" }, { "nec_pcfx", "TGFX" }, { "nec_supergrafx", "TGFX" }, { "nec_turbografx_16", "TGFX" }, { "nec_turbografx_cd", "TGFX" }, { "nintendo_3ds", "3DS" }, { "nintendo_64", "N64" }, { "nintendo_ds", "DS" }, { "nintendo_famicom_disk", "NES" }, { "nintendo_gameboy", "GB" }, { "nintendo_gameboyadvance", "GBA" }, { "nintendo_gameboycolor", "GB" }, { "nintendo_gamecube", "GCN" }, { "nintendo_nes", "NES" }, { "nintendo_super_nes", "SNES" }, { "nintendo_switch", "NSWI" }, { "nintendo_wii", "Wii" }, { "nintendo_wiiu", "WIIU" }, { "pc_dos", "DOS" }, { "pc_windows", "PC" }, { "sega_32x", "GEN" }, { "sega_cd", "SCD" }, { "sega_dreamcast", "DCST" }, { "sega_genesis", "GEN" }, { "sega_saturn", "SAT" }, { "sony_playstation", "PS1" }, { "sony_playstation2", "PS2" }, { "sony_playstation3", "PS3" }, { "sony_playstation4", "PS4" }, { "sony_playstation5", "PS5" }, { "sony_psp", "PSP" }, { "sony_vita", "VITA" }, { "xbox", "XBOX" }, { "xbox360", "360" }, { "xbox_one", "XB1" }, { "xbox_series", "XS" } }; }