public override void OnApplicationStarted() { // Add code to be executed when Playnite is initialized. if (settings.EnableIntegrationButtonHeader) { logger.Info("SuccessStory - Add Header button"); Button btHeader = new SuccessStoryButtonHeader(TransformIcon.Get("SuccessStory")); btHeader.SetValue(TextBlock.FontWeightProperty, FontWeights.Bold); btHeader.Click += OnBtHeaderClick; ui.AddButtonInWindowsHeader(btHeader); } }
public void AddBtHeader() { if (_PlayniteApi.ApplicationInfo.Mode == ApplicationMode.Desktop) { if (PluginDatabase.PluginSettings.EnableIntegrationButtonHeader) { logger.Info("SuccessStory - Add Header button"); Button btHeader = new SuccessStoryButtonHeader(TransformIcon.Get("SuccessStory")); btHeader.SetValue(TextBlock.FontWeightProperty, FontWeights.Bold); btHeader.Click += OnBtHeaderClick; ui.AddButtonInWindowsHeader(btHeader); } } }