public void MouseRightButton(TabKey key) { IPoderosaDocument doc = KeyToDocument(key); IPoderosaContextMenuPoint ctx_pt = (IPoderosaContextMenuPoint)doc.GetAdapter(typeof(IPoderosaContextMenuPoint)); //メニューが取れない場合は無視 if (ctx_pt == null || ctx_pt.ContextMenu == null || ctx_pt.ContextMenu.Length == 0) { return; } IPoderosaForm f = (IPoderosaForm)_tabBarTable.ParentForm; f.ShowContextMenu(ctx_pt.ContextMenu, doc, Control.MousePosition, ContextMenuFlags.None); }
internal static TerminalDocument AsTerminalDocument(ICommandTarget target) { IPoderosaView view = AsViewOrLastActivatedView(target); if (view == null) { return(null); } else { IPoderosaDocument doc = view.Document; if (doc == null) { return(null); } else { return((TerminalDocument)doc.GetAdapter(typeof(TerminalDocument))); } } }