public static void OpenHelpView(IHxTopic topic) { if (topic == null) { throw new ArgumentNullException("topic"); } OpenHelpView(topic.URL, null, false); }
public static void OpenHelpView(IHxTopic topic, bool hiliteMatchingWords) { if (topic == null) { throw new ArgumentNullException("topic"); } OpenHelpView(topic.URL, topic, hiliteMatchingWords); }
public static bool CheckTopicLanguage(IHxTopic topic) { if (ProjectService.CurrentProject != null) { return CheckTopicLanguage(topic, ProjectService.CurrentProject.Language); } else { return true; } }
public static void OpenHelpView(string topicLink, IHxTopic topic, bool hiliteMatchingWords) { hiliteMatches = hiliteMatchingWords; lastTopic = topic; BrowserPane help2Browser = ActiveHelp2BrowserView(); if (help2Browser != null) { help2Browser.Navigate(topicLink); help2Browser.WorkbenchWindow.SelectWindow(); } }
public static bool CheckTopicLanguage(IHxTopic topic, string expectedLanguage) { if (string.IsNullOrEmpty(expectedLanguage)) { return true; } if (topic == null) { return false; } string tempLanguage = String.Empty; if (!languages.ContainsKey(expectedLanguage) || !languages.TryGetValue(expectedLanguage, out tempLanguage)) { tempLanguage = expectedLanguage; } return (string.IsNullOrEmpty(tempLanguage) || topic.HasAttribute("DevLang", tempLanguage)); }
private static int DevLangCounter(IHxTopic topic) { if (topic == null) { return 0; } int counter = 0; IHxAttributeList topicAttributes = topic.Attributes; if (topicAttributes == null || topicAttributes.Count == 0) { return 0; } foreach (IHxAttribute attr in topicAttributes) { if (String.Compare(attr.DisplayName, "DevLang") == 0) { counter++; } } return counter; }
public static bool CheckUniqueTopicLanguage(IHxTopic topic) { if (ProjectService.CurrentProject != null) { return CheckUniqueTopicLanguage(topic, ProjectService.CurrentProject.Language); } else { return CheckUniqueTopicLanguage(topic, string.Empty); } }
public static bool CheckUniqueTopicLanguage(IHxTopic topic, string expectedLanguage) { return (CheckTopicLanguage(topic, expectedLanguage) && DevLangCounter(topic) == 1); }