Example #1
0
 /// <summary>
 /// Called for each Command specified in the Windows Ribbon (Ribbon) framework markup to bind
 /// the Command to an IUICommandHandler.
 /// </summary>
 /// <param name="commandId">The ID for the Command, which is specified in the markup resource file.</param>
 /// <param name="typeID">The Command type that is associated with a specific control.</param>
 /// <param name="commandHandler">When this method returns, contains the address of a pointer to an
 /// IUICommandHandler object. This object is a host application Command handler that is bound to one or
 /// more Commands.</param>
 /// <returns>Returns S_OK if successful, or an error value otherwise.</returns>
 public HRESULT OnCreateUICommand(uint commandId, CommandType typeID, out IUICommandHandler commandHandler)
 {
     if (_ribbonControl.MapRibbonControls.ContainsKey(commandId))
     {
         BaseRibbonControl control = _ribbonControl.MapRibbonControls[commandId] as BaseRibbonControl;
         if (control != null)
         {
             control.CommandType = typeID;
         }
     }
     commandHandler = _ribbon;
     return(HRESULT.S_OK);
 }
 /// <summary>
 /// Called for each Command specified in the Windows Ribbon (Ribbon) framework markup when the 
 /// application window is destroyed. 
 /// </summary>
 /// <param name="commandId">The ID for the Command, which is specified in the markup resource file.</param>
 /// <param name="typeID">The Command type that is associated with a specific control.</param>
 /// <param name="commandHandler">A pointer to an IUICommandHandler object. This value can be NULL.</param>
 /// <returns>Returns S_OK if successful, or an error value otherwise.</returns>
 public HRESULT OnDestroyUICommand(uint commandId, CommandType typeID, IUICommandHandler commandHandler)
 {
     return HRESULT.S_OK;
 }
 /// <summary>
 /// Called for each Command specified in the Windows Ribbon (Ribbon) framework markup to bind 
 /// the Command to an IUICommandHandler. 
 /// </summary>
 /// <param name="commandId">The ID for the Command, which is specified in the markup resource file.</param>
 /// <param name="typeID">The Command type that is associated with a specific control.</param>
 /// <param name="commandHandler">When this method returns, contains the address of a pointer to an
 /// IUICommandHandler object. This object is a host application Command handler that is bound to one or 
 /// more Commands.</param>
 /// <returns>Returns S_OK if successful, or an error value otherwise.</returns>
 public HRESULT OnCreateUICommand(uint commandId, CommandType typeID, out IUICommandHandler commandHandler)
 {
     commandHandler = _ribbon;
     return HRESULT.S_OK;
 }
Example #4
0
 /// <summary>
 /// Called for each Command specified in the Windows Ribbon (Ribbon) framework markup when the
 /// application window is destroyed.
 /// </summary>
 /// <param name="commandId">The ID for the Command, which is specified in the markup resource file.</param>
 /// <param name="typeID">The Command type that is associated with a specific control.</param>
 /// <param name="commandHandler">A pointer to an IUICommandHandler object. This value can be NULL.</param>
 /// <returns>Returns S_OK if successful, or an error value otherwise.</returns>
 public HRESULT OnDestroyUICommand(uint commandId, CommandType typeID, IUICommandHandler commandHandler)
 {
     return(HRESULT.S_OK);
 }
Example #5
0
 /// <summary>
 /// Called for each Command specified in the Windows Ribbon (Ribbon) framework markup to bind
 /// the Command to an IUICommandHandler.
 /// </summary>
 /// <param name="commandId">The ID for the Command, which is specified in the markup resource file.</param>
 /// <param name="typeID">The Command type that is associated with a specific control.</param>
 /// <param name="commandHandler">When this method returns, contains the address of a pointer to an
 /// IUICommandHandler object. This object is a host application Command handler that is bound to one or
 /// more Commands.</param>
 /// <returns>Returns S_OK if successful, or an error value otherwise.</returns>
 public HRESULT OnCreateUICommand(uint commandId, CommandType typeID, out IUICommandHandler commandHandler)
 {
     commandHandler = _ribbon;
     return(HRESULT.S_OK);
 }
 public int OnDestroyUICommand(uint commandId, CommandTypeID typeID, IUICommandHandler commandHandler)
 {
     return HRESULT.E_NOTIMPL;
 }
 public int OnCreateUICommand(uint commandId, CommandTypeID typeID, out IUICommandHandler commandHandler)
 {
     commandHandler = _htmlEditor.CommandManager;
     return HRESULT.S_OK;
 }
Example #8
0
 public void AddSubscriber(IUICommandHandler uiCommandChannelHandler)
 {
     uiCommandChannelHandlers.Add(uiCommandChannelHandler);
 }