Esempio n. 1
0
        private ContextMenuStrip createMenuBkgImage()
        {
            LinkedList <Services.MenuItem> menuItems = new LinkedList <Services.MenuItem>();


            menuItems.AddLast(new MenuItemImpl("mnuDelete", "Удалить", null, mhuDeleteFigure_Click));
            menuItems.AddLast(new MenuItemImpl("mnuPosition", "Положение", null, null));
            menuItems.AddLast(new MenuItemImpl("mnuEditImage", "Эффекты", null, null));
            menuItems.AddLast(new MenuItemImpl("mnuCopy", "Копировать", null, mnuCopy_Click));
            menuItems.AddLast(new MenuItemImpl("mnuGetProperty", "Свойства", null, canvas_double_click));

            ContextMenuBuilder menuBuilder = new ContextMenuBuilder(menuItems);

            menuBuilder.addToExistingStrip("mnuPosition", new MenuItemImpl("mnuLevelUp", "На уровень вышe", null, mnuUp_Click));
            menuBuilder.addToExistingStrip("mnuPosition", new MenuItemImpl("mnuLevelUp", "На уровень ниже", null, mnuLower_Click));
            menuBuilder.addToExistingStrip("mnuPosition", new MenuItemImpl("mnuLevelUp", "На передний план", null, mnuToFrontClick));
            menuBuilder.addToExistingStrip("mnuPosition", new MenuItemImpl("mnuLevelUp", "На задний план", null, mnuToBack_Click));

            menuBuilder.addToExistingStrip("mnuEditImage", new MenuItemImpl("mnuInverse", "Инвертировать", null, mnuInversion_Click));
            menuBuilder.addToExistingStrip("mnuEditImage", new MenuItemImpl("mnuMirror", "Отзеркалить", null, null));
            menuBuilder.addToExistingStrip("mnuMirror", new MenuItemImpl("mnuMirrorHorizontal", "По горизонтали", null, mnuMirrorHorizontal_Click));
            menuBuilder.addToExistingStrip("mnuMirror", new MenuItemImpl("mnuMirrorVertical", "По вертикали", null, mnuMirrorVertical_Click));
            menuBuilder.addToExistingStrip("mnuEditImage", new MenuItemImpl("mnuRotate", "Повернуть", null, null));
            menuBuilder.addToExistingStrip("mnuRotate", new MenuItemImpl("mnuRotateClockwise", "По часовой", null, mnuRotateClockwise_Click));
            menuBuilder.addToExistingStrip("mnuRotate", new MenuItemImpl("mnuRotateCounter-Clockwise", "Против часовой", null, mnuRotateCounter_Clockwise_Click));


            return(menuBuilder.getContext());
        }