/// <summary> /// Show help table of contents. /// </summary> public static void ShowHelpTableOfContents() { #if DEBUG MessageBoxMessage.Send("ShowHelpTableOfContents", "Klicked", true); #endif var culture = Thread.CurrentThread.CurrentUICulture; switch (culture.TwoLetterISOLanguageName) { case "en": if (!File.Exists("en/MiResiliencia Desktop.chm")) { goto default; } System.Windows.Forms.Help.ShowHelp(null, "en/MiResiliencia Desktop.chm", HelpNavigator.TableOfContents); break; case "de": if (!File.Exists("de/MiResiliencia Desktop.chm")) { goto default; } System.Windows.Forms.Help.ShowHelp(null, "de/MiResiliencia Desktop.chm", HelpNavigator.TableOfContents); break; case "es": default: System.Windows.Forms.Help.ShowHelp(null, "es/MiResiliencia Desktop.chm", HelpNavigator.TableOfContents); break; } }
/// <summary> /// Show a help topic in the online CHM style help. /// </summary> /// <param name="helpTopic">The help topic to show. This must match exactly with the name /// of one of the help topic's .htm files, without the .htm extention and with spaces instead of underscores /// in the name. For instance, to display the help topic "This_is_my_topic.htm", pass the string "This is my topic".</param> /// <remarks>You can also pass in the help topic with the underscore replacement already done. You can also /// add the .htm extension. /// Certain characters other than spaces are replaced by underscores in RoboHelp help topic names. /// This method does not yet account for all those replacements, so if you really need to find a help topic /// with one or more of those characters, do the underscore replacement before passing the topic.</remarks> public static void ShowHelpTopic(string helpTopic) { // Strip off trailing period. if (helpTopic.IndexOf(".") == helpTopic.Length - 1) { helpTopic = helpTopic.Substring(0, helpTopic.Length - 1); } helpTopic = helpTopic.Replace(" ", "_").Replace("\\", "_").Replace("/", "_").Replace(":", "_").Replace("*", "_").Replace("?", "_").Replace("\"", "_").Replace(">", "_").Replace("<", "_").Replace("|", "_") + (helpTopic.IndexOf(".htm") == -1 ? ".htm" : ""); #if DEBUG MessageBoxMessage.Send("ShowHelpTopic", "Klicked on " + helpTopic, true); #endif var culture = Thread.CurrentThread.CurrentUICulture; switch (culture.TwoLetterISOLanguageName) { case "en": if (!File.Exists("en/MiResiliencia Desktop.chm")) { goto default; } Help.ShowHelp(null, "en/MiResiliencia Desktop.chm", HelpNavigator.Topic, helpTopic); break; case "de": if (!File.Exists("de/MiResiliencia Desktop.chm")) { goto default; } Help.ShowHelp(null, "de/MiResiliencia Desktop.chm", HelpNavigator.Topic, helpTopic); break; case "es": default: Help.ShowHelp(null, "es/MiResiliencia Desktop.chm", HelpNavigator.Topic, helpTopic); break; } }