Beispiel #1
0
        protected virtual CustomContextMenu CreateContextMenu()
        {
            CustomContextMenu menu = new CustomContextMenu();

            m_ItemCut            = new ContextMenuItem(Localization.ContextCmd_Cut);
            m_ItemCut.Icon       = UriResources.Images.Cut16;
            m_ItemCut.ItemClick += new EventHandler(itemCut_ItemClick);
            menu.AddMenuItem(m_ItemCut);
            m_ItemCopy            = new ContextMenuItem(Localization.ContextCmd_Copy);
            m_ItemCopy.Icon       = UriResources.Images.Copy16;
            m_ItemCopy.ItemClick += new EventHandler(itemCopy_ItemClick);
            menu.AddMenuItem(m_ItemCopy);
            m_ItemPaste            = new ContextMenuItem(Localization.ContextCmd_Paste);
            m_ItemPaste.Icon       = UriResources.Images.Paste16;
            m_ItemPaste.ItemClick += new EventHandler(itemPaste_ItemClick);
            menu.AddMenuItem(m_ItemPaste);
            m_ItemDelete            = new ContextMenuItem(Localization.ContextCmd_Delete);
            m_ItemDelete.Icon       = UriResources.Images.Delete16;
            m_ItemDelete.ItemClick += new EventHandler(itemDelete_ItemClick);
            menu.AddMenuItem(m_ItemDelete);
            menu.AddMenuSplitter();
            ContextMenuItem item = new ContextMenuItem(Localization.ContextCmd_SelectAll);

            item.ItemClick += new EventHandler(itemSelectAll_ItemClick);
            menu.AddMenuItem(item);

            return(menu);
        }
        protected virtual CustomContextMenu CreateContextMenu()
        {
            CustomContextMenu contextMenu = new CustomContextMenu();
            ContextMenuItem   item;

            m_MoveUp_MenuItem      = new ContextMenuItem(Localization.MdxDesigner_ContextMenu_MoveUp);
            m_MoveUp_MenuItem.Icon = UriResources.Images.Up16;
            contextMenu.AddMenuItem(m_MoveUp_MenuItem);
            m_MoveUp_MenuItem.ItemClick += new EventHandler(MoveUp_ItemClick);

            m_MoveDown_MenuItem      = new ContextMenuItem(Localization.MdxDesigner_ContextMenu_MoveDown);
            m_MoveDown_MenuItem.Icon = UriResources.Images.Down16;
            contextMenu.AddMenuItem(m_MoveDown_MenuItem);
            m_MoveDown_MenuItem.ItemClick += new EventHandler(MoveDown_ItemClick);

            //contextMenu.AddMenuSplitter();

            item      = new ContextMenuItem(Localization.MdxDesigner_ContextMenu_RemoveField);
            item.Icon = UriResources.Images.RemoveHot16;
            contextMenu.AddMenuItem(item);
            item.ItemClick += new EventHandler(Remove_ItemClick);

            // Используем открытие и закрытие меню для работы с тултипом
            contextMenu.PopupControl.Closed -= new EventHandler(PopupControl_Closed);
            contextMenu.PopupControl.Closed += new EventHandler(PopupControl_Closed);
            contextMenu.PopupControl.Opened -= new EventHandler(PopupControl_Opened);
            contextMenu.PopupControl.Opened += new EventHandler(PopupControl_Opened);
            return(contextMenu);
        }
Beispiel #3
0
        protected override Ranet.AgOlap.Controls.ContextMenu.CustomContextMenu CreateContextMenu()
        {
            CustomContextMenu contextMenu = base.CreateContextMenu();

            if (contextMenu.Items.Count > 0)
            {
                contextMenu.AddMenuSplitter();
            }

            m_Cancel_Filter_MenuItem      = new ContextMenuItem(Localization.MdxDesigner_ContextMenu_CancelFilter);
            m_Cancel_Filter_MenuItem.Icon = UriResources.Images.CancelFilter16;
            contextMenu.AddMenuItem(m_Cancel_Filter_MenuItem);
            m_Cancel_Filter_MenuItem.ItemClick += new EventHandler(m_Cancel_Filter_MenuItem_ItemClick);

            m_MembersFilter_MenuItem      = new ContextMenuItem(Localization.MdxDesigner_ContextMenu_ChangeFilter);
            m_MembersFilter_MenuItem.Icon = UriResources.Images.ChangeFilter16;
            contextMenu.AddMenuItem(m_MembersFilter_MenuItem);
            m_MembersFilter_MenuItem.ItemClick += new EventHandler(m_Members_Filter_MenuItem_ItemClick);

            Refresh();
            return(contextMenu);
        }
Beispiel #4
0
        protected virtual CustomContextMenu CreateContextMenu()
        {
            CustomContextMenu contextMenu = new CustomContextMenu();
            ContextMenuItem   item;

            m_MoveUp_MenuItem      = new ContextMenuItem(Localization.MdxDesigner_ContextMenu_MoveUp);
            m_MoveUp_MenuItem.Icon = UriResources.Images.Up16;
            contextMenu.AddMenuItem(m_MoveUp_MenuItem);
            m_MoveUp_MenuItem.ItemClick += new EventHandler(MoveUp_ItemClick);

            m_MoveDown_MenuItem      = new ContextMenuItem(Localization.MdxDesigner_ContextMenu_MoveDown);
            m_MoveDown_MenuItem.Icon = UriResources.Images.Down16;
            contextMenu.AddMenuItem(m_MoveDown_MenuItem);
            m_MoveDown_MenuItem.ItemClick += new EventHandler(MoveDown_ItemClick);

            //contextMenu.AddMenuSplitter();

            item      = new ContextMenuItem(Localization.MdxDesigner_ContextMenu_RemoveField);
            item.Icon = UriResources.Images.RemoveHot16;
            contextMenu.AddMenuItem(item);
            item.ItemClick += new EventHandler(Remove_ItemClick);

            return(contextMenu);
        }