Exemplo n.º 1
0
        /// <summary>
        /// Helper function used to determine if a given command-id is enabled
        /// </summary>
        /// <param name="cmdID">command id</param>
        /// <returns>true if enabled, otherwise false</returns>
        protected bool IsEnabled(OLECMDID cmdID)
        {
            // query the underlying command
            OLECMDF cmdf = Browser.QueryStatusWB(cmdID);

            // return the appropriate value
            if ((cmdf & OLECMDF.OLECMDF_ENABLED) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// Helper function used to determine if a given command-id is enabled
        /// </summary>
        /// <param name="cmdID">command id</param>
        /// <returns>true if enabled, otherwise false</returns>
        protected bool IsEnabled(OLECMDID cmdID)
        {
            // query the underlying command
            OLECMDF cmdf = Browser.QueryStatusWB(cmdID);

            // return the appropriate value
            if ((cmdf & OLECMDF.OLECMDF_ENABLED) > 0)
                return true;
            else
                return false;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initialize a NativeBrowserCommand
 /// </summary>
 /// <param name="browser">reference to underlying browser control</param>
 /// <param name="cmdID">unique ID of command</param>
 public StandardBrowserCommand(AxWebBrowser browser, OLECMDID cmdID)
     : base(browser)
 {
     m_cmdID = cmdID;
 }
 /// <summary>
 /// Initialize a NativeBrowserCommand
 /// </summary>
 /// <param name="browser">reference to underlying browser control</param>
 /// <param name="cmdID">unique ID of command</param>
 public StandardBrowserCommand(AxWebBrowser browser, OLECMDID cmdID)
     : base(browser)
 {
     m_cmdID = cmdID;
 }