private static void ShowHelpLocal(string strTopic, string strSection) { Debug.Assert(m_strLocalHelpFile != null); // Unblock CHM file for proper display of help contents WinUtil.RemoveZoneIdentifier(m_strLocalHelpFile); string strCmd = "\"ms-its:" + m_strLocalHelpFile; if (strTopic != null) { strCmd += @"::/help/" + strTopic + ".html"; } if (strSection != null) { Debug.Assert(strTopic != null); // Topic must be present for section strCmd += @"#" + strSection; } strCmd += "\""; try { Process.Start(WinUtil.LocateSystemApp("hh.exe"), strCmd); } catch (Exception exStart) { MessageService.ShowWarning(@"hh.exe " + strCmd, exStart); } }
private static void ShowHelpLocal(string strTopic, string strSection) { string strFile = AppHelp.LocalHelpFile; if (string.IsNullOrEmpty(strFile)) { Debug.Assert(false); return; } // Unblock CHM file for proper display of help contents WinUtil.RemoveZoneIdentifier(strFile); string strCmd = "\"ms-its:" + strFile; if (!string.IsNullOrEmpty(strTopic)) { strCmd += "::/help/" + strTopic + ".html"; if (!string.IsNullOrEmpty(strSection)) { strCmd += "#" + strSection; } } strCmd += "\""; if (ShowHelpLocalKcv(strCmd)) { return; } string strDisp = strCmd; try { if (NativeLib.IsUnix()) { Process p = Process.Start(NativeLib.EncodePath(strCmd.Trim('\"'))); if (p != null) { p.Dispose(); } } else // Windows { strDisp = "HH.exe " + strDisp; Process p = Process.Start(NativeLib.EncodePath( WinUtil.LocateSystemApp("hh.exe")), strCmd); if (p != null) { p.Dispose(); } } } catch (Exception ex) { MessageService.ShowWarning(strDisp, ex); } }