private void ctxDirectoryNode_Rename_Click(object sender, EventArgs e)
        {
            DirectoryInfo             directoryInfo       = new DirectoryInfo(this.GetFullPath(this.treeView.SelectedNode));
            RenameFileSystemEntryForm fileSystemEntryForm = new RenameFileSystemEntryForm();

            fileSystemEntryForm.Init(directoryInfo.Name);
            if (fileSystemEntryForm.ShowDialog((IWin32Window)this) == DialogResult.OK)
            {
                try
                {
                    directoryInfo.MoveTo(string.Format("{0}\\{1}", (object)directoryInfo.Parent.FullName, (object)fileSystemEntryForm.EntryName));
                }
                catch (Exception ex)
                {
                    int num = (int)MessageBox.Show((IWin32Window)this, ex.Message);
                }
            }
            fileSystemEntryForm.Dispose();
        }
Example #2
0
 private void ctxDirectoryNode_Rename_Click(object sender, EventArgs e)
 {
   DirectoryInfo directoryInfo = new DirectoryInfo(this.GetFullPath(this.treeView.SelectedNode));
   RenameFileSystemEntryForm fileSystemEntryForm = new RenameFileSystemEntryForm();
   fileSystemEntryForm.Init(directoryInfo.Name);
   if (fileSystemEntryForm.ShowDialog((IWin32Window) this) == DialogResult.OK)
   {
     try
     {
       directoryInfo.MoveTo(string.Format("{0}\\{1}", (object) directoryInfo.Parent.FullName, (object) fileSystemEntryForm.EntryName));
     }
     catch (Exception ex)
     {
       int num = (int) MessageBox.Show((IWin32Window) this, ex.Message);
     }
   }
   fileSystemEntryForm.Dispose();
 }