public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { mainMenuitems = new List <MainMenuItem> { new MainMenuItem { Description = ResourceProvider.GetString("LOCResolutionChanger_MenuItemDescriptionClearResolutionFeature"), MenuSection = "@Resolution Changer", Action = a => { RemoveResolutionConfigurationSelected(); PlayniteApi.Dialogs.ShowMessage(ResourceProvider.GetString("LOCResolutionChanger_DialogMessageDone")); } } }; detectedResolutions = DisplayHelper.GetPossibleResolutions() .Distinct() .OrderByDescending(x => x.Key).ThenByDescending(x => x.Value).ToList(); foreach (var resolution in detectedResolutions) { mainMenuitems.Add( new MainMenuItem { Description = string.Format(ResourceProvider.GetString("LOCResolutionChanger_MenuItemDescriptionSetLaunchResolutionFeature"), resolution.Key, resolution.Value, DisplayHelper.GetResolutionAspectRatio(resolution.Key, resolution.Value)), MenuSection = "@Resolution Changer", Action = a => { SetResolutionFeature(resolution.Key, resolution.Value); PlayniteApi.Dialogs.ShowMessage(ResourceProvider.GetString("LOCResolutionChanger_DialogMessageDone")); } } ); } }
public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { if (settings.Settings.ExecuteOnStartup == true) { MainMethod(false); } }
public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { if (settings.Settings.UpdateOnStartup == true) { DetectInstallationStatus(false); } }
public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { if (settings.Settings.ControllerNoticeShowed) { PlayniteApi.Dialogs.ShowMessage("\n\nSplashScreen extension - Important Information!\n\nThe workaround to fix broken input when closing a game in Fullscreen mode has been added natively in the extension.\n\nThe extension will automatically press the window key twice when closing a game in Fullscreen Mode.\n\nIf you manually added the workaround fix, please remove it from Settings -> Scripts -> Script when game is closed. I have not been able to find a fix for the issue so this fix needs to be used.\n\nSorry for the inconvenience and thanks for understanding.", "SplashScreen extension - Important Information"); settings.Settings.ControllerNoticeShowed = false; SavePluginSettings(settings.Settings); } }
// Hotkey implementation based on https://github.com/felixkmh/QuickSearch-for-Playnite public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { mainWindow = Application.Current.MainWindow; if (mainWindow != null) { windowInterop = new WindowInteropHelper(mainWindow); mainWindowHandle = windowInterop.Handle; source = HwndSource.FromHwnd(mainWindowHandle); RegisterGlobalHotkey(); } else { logger.Error("Could not find main window. Shortcuts could not be registered."); } }
public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { if (settings.Settings.DatabaseVersion < currentDatabaseVersion || !File.Exists(databasePath)) { PlayniteApi.Dialogs.ActivateGlobalProgress((_) => { logger.Info("Decompressing database zip file..."); ZipFile.ExtractToDirectory(databaseZipPath, GetPluginUserDataPath()); logger.Info("Decompressed database zip file"); }, new GlobalProgressOptions(ResourceProvider.GetString("LOCCooperativeModesImporter_DialogProgressMessageUpdatingDatabase"))); if (settings.Settings.DatabaseVersion != currentDatabaseVersion) { logger.Info($"Database updated from {settings.Settings.DatabaseVersion} to {currentDatabaseVersion}"); settings.Settings.DatabaseVersion = currentDatabaseVersion; SavePluginSettings(settings.Settings); } } }
public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { mainWindow = Application.Current.MainWindow; if (mainWindow != null) { windowInterop = new WindowInteropHelper(mainWindow); mainWindowHandle = windowInterop.Handle; source = HwndSource.FromHwnd(mainWindowHandle); source.AddHook(GlobalHotkeyCallback); } else { logger.Error("Could not find Playnite main window."); } if (settings.Settings.UpdateOnStartup == true) { DetectInstallationStatus(false); } }
public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { // Add code to be executed when Playnite is initialized. }
public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { logger.Info("TestPluginDev OnApplicationStarted"); //CrashTest(); }
public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { // Add code to be executed when Playnite is initialized. DoSpeak(Settings.Settings.SpeakApplicationStartedText, Settings.Settings.SpeakApplicationStarted, true); }
// Add code to be executed when Playnite is initialized. public override void OnApplicationStarted(OnApplicationStartedEventArgs args) { }
/// <summary> /// Called when appliaction is started and initialized. /// </summary> public virtual void OnApplicationStarted(OnApplicationStartedEventArgs args) { }