Пример #1
0
 /// <summary>
 /// Add items to the context menu.
 /// </summary>
 private void OnContextMenuInvoked(object sender, HtmlContextMenuEventArgs eventArgs)
 {
     RContextMenu contextMenu = eventArgs.ContextMenu;
     string searchEngineTitle = Preferences.StandardPreferences.DefaultSearchEngine;
     contextMenu.AddItem(string.Format(Resources.SearchWith, searchEngineTitle), !string.IsNullOrEmpty(GetSelection()), OnContextMenuClick);
 }
Пример #2
0
 /// <summary>
 /// Propagate the ContextMenuInvoked event from root container.
 /// </summary>
 protected virtual void OnContextMenuInvoked(HtmlContextMenuEventArgs e)
 {
     var handler = ContextMenuInvoked;
     if (handler != null)
         handler(this, e);
 }
Пример #3
0
 private void OnContextMenuInvoked(object sender, HtmlContextMenuEventArgs e)
 {
     OnContextMenuInvoked(e);
 }
Пример #4
0
 /// <summary>
 /// Handle context menu customisation by the caller
 /// </summary>
 /// <param name="contextMenu">the context menu to customise</param>
 internal void HandleContextMenuInvoked(RContextMenu contextMenu)
 {
     EventHandler<HtmlContextMenuEventArgs> contextMenuHandler = ContextMenuInvoked;
     if (contextMenuHandler != null)
     {
         var args = new HtmlContextMenuEventArgs(contextMenu);
         try
         {
             contextMenuHandler(this, args);
         }
         catch (Exception ex)
         {
             throw new Exception("Error in context menu intercept", ex);
         }
     }
 }