void OnPopupMenu(object sender, Gtk.PopupMenuArgs e) { try { var mainWindowType = pluginHost.MainWindow.GetType(); var cxtTrayField = mainWindowType.GetField("m_ctxTray", BindingFlags.Instance | BindingFlags.NonPublic); var ctxTray = cxtTrayField.GetValue(pluginHost.MainWindow); // Synthesize menu open events. These are expected by KeePass and // other plugins var onOpening = ctxTray.GetType().GetMethod("OnOpening", BindingFlags.Instance | BindingFlags.NonPublic); DBusBackgroundWorker.InvokeWinformsThread(() => onOpening.Invoke(ctxTray, new[] { new CancelEventArgs() })); statusIconMenu.Popup(null, null, null, (uint)e.Args[0], (uint)e.Args[1]); var onOpened = ctxTray.GetType().GetMethod("OnOpened", BindingFlags.Instance | BindingFlags.NonPublic); DBusBackgroundWorker.InvokeWinformsThread(() => onOpened.Invoke(ctxTray, new[] { new CancelEventArgs() })); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
void OnPopupMenu(object sender, Gtk.PopupMenuArgs args) { Gtk.TextIter click_iter = Buffer.GetIterAtMark(Buffer.InsertMark); Buffer.MoveMark(click_mark, click_iter); args.RetVal = false; // Continue event processing }
private void Control_PopupMenu(object o, Gtk.PopupMenuArgs args) { Menu.ToGtk()?.Popup(null, null, null, (uint)args.Args[0], (uint)args.Args[1]); }
void HandleStatusItemPopupMenu(object o, Gtk.PopupMenuArgs args) { menu.Popup(); }
private void OnPopupMenu(object o, Gtk.PopupMenuArgs args) { ShowPopup(); }