private bool ShowHelp() { string str = this.F1Keyword; if (!string.IsNullOrEmpty(str) && (this.serviceProvider != null)) { Microsoft.VisualStudio.VSHelp.Help service = this.serviceProvider.GetService(typeof(Microsoft.VisualStudio.VSHelp.Help)) as Microsoft.VisualStudio.VSHelp.Help; if (service != null) { try { service.DisplayTopicFromF1Keyword(str); return(true); } catch (COMException exception) { if (exception.ErrorCode != -2147220731) { throw; } } } } return(false); }
public GettingStarted() { _DTE = Package.GetGlobalService(typeof(DTE)) as DTE; _helpService = Package.GetGlobalService(typeof(VSHelp.SVsHelp)) as VSHelp.Help; InitializeComponent(); ExtensionInformation.LUFA.ReleaseTypes releaseType; string versionString = ExtensionInformation.LUFA.GetVersion(out releaseType); if (versionString != null) { Run versionTextRun = new Run(); versionTextRun.FontWeight = FontWeights.Bold; versionTextRun.FontSize = 12; versionTextRun.Text = String.Format("({0} {1})", (releaseType == ExtensionInformation.LUFA.ReleaseTypes.Test) ? "Test Release" : "Version", versionString); FooterText.Inlines.InsertAfter(FooterText.Inlines.LastInline, new LineBreak()); FooterText.Inlines.InsertAfter(FooterText.Inlines.LastInline, versionTextRun); } }