Пример #1
0
            public RsCollectionTreeContextMenu(RsCollectionTree Owner) : base()
            {
                ItemNewFolder    = new RsCollectionTree.RsCollectionTreeContextMenuItem("_newFolder", this);
                ItemRenameFolder = new RsCollectionTree.RsCollectionTreeContextMenuItem("_renameFolder", this);
                ItemRemoveFolder = new RsCollectionTree.RsCollectionTreeContextMenuItem("_removeFolder", this);

                this.MenuItems.Add(ItemNewFolder);
                this.MenuItems.Add(ItemRenameFolder);
                this.MenuItems.Add(new MenuItem("-"));
                this.MenuItems.Add(ItemRemoveFolder);

                ItemNewFolder.Click    += new EventHandler(ehNewFolder);
                ItemRenameFolder.Click += new EventHandler(ehRenameFolder);
                ItemRemoveFolder.Click += new EventHandler(ehRemoveFolder);

                IsMenuActive = false;
            }
            public RsCollectionTreeContextMenu(RsCollectionTree Owner)
                : base()
            {
                ItemNewFolder = new RsCollectionTree.RsCollectionTreeContextMenuItem("_newFolder", this);
                                ItemRenameFolder = new RsCollectionTree.RsCollectionTreeContextMenuItem("_renameFolder", this);
                                ItemRemoveFolder = new RsCollectionTree.RsCollectionTreeContextMenuItem("_removeFolder", this);

                                this.MenuItems.Add(ItemNewFolder);
                                this.MenuItems.Add(ItemRenameFolder);
                                this.MenuItems.Add(new MenuItem("-"));
                                this.MenuItems.Add(ItemRemoveFolder);

                                ItemNewFolder.Click += new EventHandler(ehNewFolder);
                                ItemRenameFolder.Click += new EventHandler(ehRenameFolder);
                                ItemRemoveFolder.Click += new EventHandler(ehRemoveFolder);

                                IsMenuActive = false;
            }