private void button4_Click(object sender, EventArgs e) { if (textBox1.Text.Trim() != "" && textBox2.Text.Trim() != "") { clsFile_n_Folder cls = new clsFile_n_Folder(); cls.MoveTo(textBox1.Text.Trim(), textBox2.Text.Trim()); try { treeView1.Nodes.Clear(); //DirectoryInfo info = new DirectoryInfo(textBox1.Text.Trim()); //GetTree(info, treeView1); //treeView1.Refresh(); treeView2.Nodes.Clear(); DirectoryInfo info2 = new DirectoryInfo(textBox2.Text.Trim()); GetTree(info2, treeView2); treeView2.Refresh(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
private void DEL_Click(object sender, EventArgs e) { if (textBox1.Text.Trim() != "") { clsFile_n_Folder cls = new clsFile_n_Folder(); try { cls.DelFolder(textBox1.Text.Trim()); treeView1.Nodes.Clear(); //DirectoryInfo info = new DirectoryInfo(textBox1.Text.Trim()); //GetTree(info, treeView1); //treeView1.Refresh(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }