示例#1
0
        void m_TreeView_MouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                TreeNode node = m_TreeView.GetNodeAt(e.Location);

                if ((node != null) && (node == m_RightClickNode))
                {
                    ShellItem folder = (ShellItem)node.Tag;

                    if (folder != null)
                    {
                        try
                        {
                            string ret = new ShellContextMenu(folder).ShowContextMenu(m_TreeView, e.Location);
                            if (ret == "rename")
                            {
                                m_TreeView.SelectedNode.BeginEdit();
                            }
                        }
                        catch (Exception ex)
                        {
                            Console.Write("\n" + ex.Message);
                        }
                    }
                }
            }
        }
示例#2
0
 public MessageWindow(ShellContextMenu parent)
 {
     m_Parent = parent;
 }
示例#3
0
        /// <summary>
        /// Pastes the contents of the clipboard into the current folder.
        /// </summary>
        public void PasteClipboard()
        {
            ShellContextMenu contextMenu = new ShellContextMenu(m_CurrentFolder);

            contextMenu.InvokePaste();
        }
示例#4
0
        /// <summary>
        /// Deletes the item currently selected in the <see cref="ShellView"/>.
        /// </summary>
        public void DeleteSelectedItems()
        {
            ShellContextMenu contextMenu = new ShellContextMenu(SelectedItems);

            contextMenu.InvokeDelete();
        }
示例#5
0
        /// <summary>
        /// Cuts the currently selected items.
        /// </summary>
        public void CutSelectedItems()
        {
            ShellContextMenu contextMenu = new ShellContextMenu(SelectedItems);

            contextMenu.InvokeCut();;
        }
示例#6
0
        /// <summary>
        /// Copies the currently selected items to the clipboard.
        /// </summary>
        public void CopySelectedItems()
        {
            ShellContextMenu contextMenu = new ShellContextMenu(SelectedItems);

            contextMenu.InvokeCopy();
        }