예제 #1
0
        private void ctxDirectoryNode_Add_NewFolder_Click(object sender, EventArgs e)
        {
            DirectoryInfo      directory          = new DirectoryInfo(this.GetFullPath(this.treeView.SelectedNode));
            NewDirectoryDialog newDirectoryDialog = new NewDirectoryDialog(directory);

            newDirectoryDialog.Text = "Create New Folder";
            if (newDirectoryDialog.ShowDialog((IWin32Window)this) == DialogResult.OK)
            {
                try
                {
                    directory.CreateSubdirectory(newDirectoryDialog.FolderName);
                }
                catch (Exception ex)
                {
                    int num = (int)MessageBox.Show((IWin32Window)this, ex.Message);
                }
            }
            newDirectoryDialog.Dispose();
        }
예제 #2
0
 private void ctxDirectoryNode_Add_NewFolder_Click(object sender, EventArgs e)
 {
   DirectoryInfo directory = new DirectoryInfo(this.GetFullPath(this.treeView.SelectedNode));
   NewDirectoryDialog newDirectoryDialog = new NewDirectoryDialog(directory);
   newDirectoryDialog.Text = "Create New Folder";
   if (newDirectoryDialog.ShowDialog((IWin32Window) this) == DialogResult.OK)
   {
     try
     {
       directory.CreateSubdirectory(newDirectoryDialog.FolderName);
     }
     catch (Exception ex)
     {
       int num = (int) MessageBox.Show((IWin32Window) this, ex.Message);
     }
   }
   newDirectoryDialog.Dispose();
 }