Exemple #1
0
 private void Menu_ItemClicked(object sender, MouseEventArgs e)
 {
     //object cid = e.ClickedItem.Tag;
     MenuItemsTags.TryGetValue((MenuItem)sender, out object cid);
     if (cid != null)
     {
         Callback.Continue((int)cid, CefEventFlags.LeftMouseButton);
         Callback = null;
     }
 }
Exemple #2
0
        private void Menu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            object cid = e.ClickedItem.Tag;

            if (cid != null)
            {
                Callback.Continue((int)cid, CefEventFlags.LeftMouseButton);
                Callback = null;
            }
        }
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            var    clickedItem = sender as MenuItem;
            object cid         = clickedItem?.Tag;

            if (cid != null)
            {
                Callback.Continue((int)cid, CefEventFlags.LeftMouseButton);
                Callback = null;
            }
        }
Exemple #4
0
 public ModernFormsContextMenuRunner(CefContextMenuParams menuParams, CefMenuModel model, CefRunContextMenuCallback callback)
 {
     MenuParams = menuParams;
     Model      = model;
     Callback   = callback;
 }
Exemple #5
0
 /// <summary>
 /// The run context menu.
 /// </summary>
 /// <param name="browser">
 /// The browser.
 /// </param>
 /// <param name="frame">
 /// The frame.
 /// </param>
 /// <param name="parameters">
 /// The parameters.
 /// </param>
 /// <param name="model">
 /// The model.
 /// </param>
 /// <param name="callback">
 /// The callback.
 /// </param>
 /// <returns>
 /// The <see cref="bool"/>.
 /// </returns>
 protected override bool RunContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams parameters, CefMenuModel model, CefRunContextMenuCallback callback)
 {
     return(false);
 }
 public WpfContextMenuRunner(CefMenuModel model, CefRunContextMenuCallback callback)
 {
     Model    = MenuModel.FromCefMenu(model);
     Callback = callback;
 }
 public void Cancel()
 {
     Callback?.Cancel();
     Callback = null;
 }
Exemple #8
0
 protected internal unsafe override bool RunContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams @params, CefMenuModel model, CefRunContextMenuCallback callback)
 {
     return(_implementation.RunContextMenu(browser, frame, @params, model, callback));
 }
 internal protected virtual bool RunContextMenu(CefBrowser browser, CefFrame frame, CefContextMenuParams menuParams, CefMenuModel model, CefRunContextMenuCallback callback)
 {
     return(WebView.RaiseRunContextMenu(frame, menuParams, model, callback));
 }
 public void Cancel()
 {
     _completionSource?.TrySetResult(false);
     Callback?.Cancel();
     Callback = null;
 }