Exemplo n.º 1
0
        private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (RightClickedNode != null)
            {
                DialogResult result = MessageBox.Show("Are you sure you want to delete '" + RightClickedNode.Tag.ToString() + "'?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk);
                if (RightClickedNode.Nodes.Count == 0)
                {
                    IBMi.DeleteFile(RightClickedNode.Tag.ToString());
                }
                else
                {
                    IBMi.DeleteDir(RightClickedNode.Tag.ToString());
                }

                RightClickedNode.Remove();
            }
        }