コード例 #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets a help file URL or topic
        /// </summary>
        /// <param name="stid"></param>
        /// <returns>The requested string</returns>
        /// ------------------------------------------------------------------------------------
        public override string GetHelpString(string stid)
        {
            // First check if the stid starts with the marker that tells us the user is wanting
            // help on a particular style displayed in the styles combo box. If so, then find
            // the correct URL for the help topic of that style's example.
            const string kStylePrefix = "style:";

            if (stid.StartsWith(kStylePrefix))
            {
                return(TeStylesXmlAccessor.GetHelpTopicForStyle(stid.Substring(kStylePrefix.Length)));
            }
            if (stid.StartsWith("khtpScrChecks_"))
            {
                return(TeResourceHelper.GetHelpString(stid) ?? base.GetHelpString("khtpScrChecksUndocumented"));
            }

            return(TeResourceHelper.GetHelpString(stid) ?? base.GetHelpString(stid));
        }
コード例 #2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets a help file URL or topic
        /// </summary>
        /// <param name="stid"></param>
        /// <param name="iKey"></param>
        /// <returns>The requested string</returns>
        /// ------------------------------------------------------------------------------------
        public override string GetHelpString(string stid, int iKey)
        {
            CheckDisposed();

            // First check if the stid starts with the marker that tells us the user is wanting
            // help on a particular style displayed in the styles combo box. If so, then find
            // the correct URL for the help topic of that style's example.
            if (stid.StartsWith("style:"))
            {
                return(TeStylesXmlAccessor.GetHelpTopicForStyle(stid.Substring(6)));
            }

            string helpString = TeResourceHelper.GetHelpString(stid);

            if (helpString != null)
            {
                return(helpString);
            }

            return(base.GetHelpString(stid, iKey));
        }