예제 #1
0
        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);
        }
예제 #2
0
        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)));
                }
            }
        }