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); } } } } }
public MessageWindow(ShellContextMenu parent) { m_Parent = parent; }
/// <summary> /// Pastes the contents of the clipboard into the current folder. /// </summary> public void PasteClipboard() { ShellContextMenu contextMenu = new ShellContextMenu(m_CurrentFolder); contextMenu.InvokePaste(); }
/// <summary> /// Deletes the item currently selected in the <see cref="ShellView"/>. /// </summary> public void DeleteSelectedItems() { ShellContextMenu contextMenu = new ShellContextMenu(SelectedItems); contextMenu.InvokeDelete(); }
/// <summary> /// Cuts the currently selected items. /// </summary> public void CutSelectedItems() { ShellContextMenu contextMenu = new ShellContextMenu(SelectedItems); contextMenu.InvokeCut();; }
/// <summary> /// Copies the currently selected items to the clipboard. /// </summary> public void CopySelectedItems() { ShellContextMenu contextMenu = new ShellContextMenu(SelectedItems); contextMenu.InvokeCopy(); }