public void ShowContextHelp(int ContextID, string HelpFileName) { bool foundViewer = false; foreach (var viewer in helpViewers) { IExtendedHelpViewer extviewer = viewer as IExtendedHelpViewer; if (extviewer != null) { foundViewer = true; if (extviewer.UnderstandsContext(ContextID, HelpFileName)) { extviewer.DisplayHelpByContext(ContextID, HelpFileName); return; } } } if (!foundViewer) { throw new EHelpSystemException("No help viewer found that implements IExtendedHelpViewer."); } }
public void ShowTopicHelp(string Topic, string HelpFileName) { bool foundViewer = false; foreach (var viewer in helpViewers) { IExtendedHelpViewer extviewer = viewer as IExtendedHelpViewer; if (extviewer != null) { foundViewer = true; if (extviewer.UnderstandsTopic(Topic)) { extviewer.DisplayTopic(Topic); return; } } } if (!foundViewer) { throw new EHelpSystemException("No help viewer found that implements IExtendedHelpViewer."); } }