public ShellFolderContextMenu(ShellFolder folder, FolderItemSelectAction folderItemSelected, ShellMenuCommandBuilder builder)
        {
            if (folder == null)
            {
                return;
            }

            lock (IconHelper.ComLock)
            {
                x = Cursor.Position.X;
                y = Cursor.Position.Y;

                this.folderItemSelected = folderItemSelected;

                SetupContextMenu(folder, builder);
            }
        }
Exemple #2
0
        public ShellContextMenu(string folder, FolderItemSelectAction folderItemSelected)
        {
            lock (Shell.ComLock)
            {
                this.CreateHandle(new CreateParams());
                this.folder = folder;

                this.parent            = getParentDir(this.folder);
                this.parentShellFolder = getParentShellFolder(this.folder);
                this.folderPidl        = pathToFullPidl(this.folder);
                this.folderRelPidl     = pathToRelPidl(this.folder);
                this.x = Cursor.Position.X;
                this.y = Cursor.Position.Y;

                this.folderItemSelected = folderItemSelected;

                ShowFolderMenu();
            }
        }
        public ShellContextMenu(SystemDirectory directory, FolderItemSelectAction folderItemSelected)
        {
            lock (Shell.ComLock)
            {
                CreateHandle(new CreateParams());
                this.directory = directory;
                folder         = directory.FullName;

                parent            = getParentDir(folder);
                parentShellFolder = getParentShellFolder(folder);
                folderPidl        = pathToFullPidl(folder);
                folderRelPidl     = pathToRelPidl(folder);
                x = Cursor.Position.X;
                y = Cursor.Position.Y;

                this.folderItemSelected = folderItemSelected;

                ShowFolderMenu();
            }
        }