示例#1
0
 private void SetUpPopUpMenu()
 {
     RightClickBarManager.Images = GetPopupMenuImages();
     RightClickBarManager.Form   = this.GridControl;
     RightClickPopupMenu.Manager = RightClickBarManager;
     RightClickPopupMenu.AddItems(GetPopupItems());
 }
示例#2
0
        private PopupMenu CreatePopupMenu(BarItem[] items, BarManager manager, string name)
        {
            PopupMenu menu = new PopupMenu(manager);

            menu.Name = name;
            menu.AddItems(items);
            return(menu);
        }
        private PopupMenu Menu_InitSortMenu()
        {
            PopupMenu sortMenu = new PopupMenu();

            manager.ItemClick += manager_ItemClick;
            sortMenu.Manager   = BarManager;
            BarCheckItem item1 = Menu_InitSortItem(SortOrder.None);
            BarCheckItem item2 = Menu_InitSortItem(SortOrder.Ascending);
            BarCheckItem item3 = Menu_InitSortItem(SortOrder.Descending);

            item1.GroupIndex = item2.GroupIndex = item3.GroupIndex = 1;
            sortMenu.AddItems(new BarItem[] { item1, item2, item3 });
            return(sortMenu);
        }
示例#4
0
        private void SetupPopupMenu()
        {
            barManager1.ForceInitialize();

            menu               = new PopupMenu();
            menu.Manager       = barManager1;
            barManager1.Images = imageCollection1;
            BarButtonItem itemInsertAbove = new BarButtonItem(barManager1, "Insert Row Above", 0);
            BarButtonItem itemInsertBelow = new BarButtonItem(barManager1, "Insert Row Below", 1);
            BarButtonItem itemDeleteRow   = new BarButtonItem(barManager1, "Delete Row", 2);
            BarButtonItem itemFixMistake  = new BarButtonItem(barManager1, "Fix Mistake", 3);

            menu.AddItems(new BarItem[] { itemInsertAbove, itemInsertBelow, itemDeleteRow, itemFixMistake });
            itemFixMistake.Links[0].BeginGroup = true;

            barManager1.ItemClick += BarManager1_ItemClick;
        }
        private void SetupPopupMenus()
        {
            barManagerFolder.ForceInitialize();
            popupMenuFolder.Manager = barManagerFolder;
            BarButtonItem itemNewFolder    = new BarButtonItem(barManagerFolder, "Create Folder", 0);
            BarButtonItem itemDeleteFolder = new BarButtonItem(barManagerFolder, "Delete Folder", 1);
            BarButtonItem itemImportFile   = new BarButtonItem(barManagerFolder, "Import File(s)", 2);
            BarButtonItem itemNewFile      = new BarButtonItem(barManagerFolder, "New File", 3);

            popupMenuFolder.AddItems(new BarItem[] { itemNewFolder, itemDeleteFolder, itemImportFile, itemNewFile });

            barManagerFile.ForceInitialize();
            popupMenuFile.Manager = barManagerFile;
            BarButtonItem itemOpenFileInApp  = new BarButtonItem(barManagerFile, "Open In LorikeetApp", 0);
            BarButtonItem itemOpenFileOutApp = new BarButtonItem(barManagerFile, "Open in outside Program", 1);
            BarButtonItem itemDeleteFile     = new BarButtonItem(barManagerFile, "Delete File", 2);
            BarButtonItem itemRenameFile     = new BarButtonItem(barManagerFile, "Rename File", 3);

            popupMenuFile.AddItems(new BarItem[] { itemOpenFileInApp, itemOpenFileOutApp, itemDeleteFile, itemRenameFile });
        }