Esempio n. 1
0
        //private void InitializeComponent()
        //{
        //    this.SuspendLayout();
        //    //
        //    // ShellTreeView
        //    //
        //    this.ResumeLayout(false);

        //}

        protected override void OnNodeMouseClick(TreeNodeMouseClickEventArgs e)
        {
            base.OnNodeMouseClick(e);

            if (e.Button == MouseButtons.Right)
            {
                //  Get the item hit.
                var itemHit = ShellObject.GetShellItem(e.Node, this.nodesToFolders);

                //  Create a default context menu.
                ShellTreeMethods.OpenItemContextMenu(e.Node, itemHit, e.X, e.Y);
            }
        }
Esempio n. 2
0
        public void DoSelect(TreeNode node)
        {
            var shellItem = ShellObject.GetShellItem(node, this.nodesToFolders);

            FireOnShellItemSelected(shellItem);
        }