private void treeView2_BeforeExpand(object sender, TreeViewCancelEventArgs e) { string dirnode = e.Node.Tag.ToString(); treeView2.Nodes.Clear(); XFile.LoadFileandFolded(dirnode, treeView2); if (treeView2.Tag != null) { txt_current.Text = treeView2.Tag.ToString(); } }
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (treeView2.Tag != null) { GetBack(treeView2.Tag.ToString()); } dirForward.Clear(); if (e.Node.Tag != null) { treeView2.Nodes.Clear(); XFile.LoadFileandFolded(e.Node.Tag.ToString(), treeView2); } txt_current.Text = treeView2.Tag.ToString(); }
private void btn_Forward_Click(object sender, EventArgs e) { if (dirForward.Count == 0) { return; } dirBack.Push(treeView2.Tag.ToString()); string dir = dirForward.Pop(); XFile.LoadFileandFolded(dir, treeView2); if (treeView2.Tag != null) { txt_current.Text = treeView2.Tag.ToString(); } }
private void treeView2_AfterSelect(object sender, TreeViewEventArgs e) { string dirnode = e.Node.Tag.ToString(); if (File.GetAttributes(dirnode) == FileAttributes.Directory) { if (treeView2.Tag != null) { GetBack(treeView2.Tag.ToString()); } XFile.LoadFileandFolded(dirnode, treeView2); txt_current.Text = treeView2.Tag.ToString(); } else { fDetail f = new fDetail(dirnode); f.ShowDialog(); XFile.LoadFileandFolded(treeView2.Tag.ToString(), treeView2); } }
private void btn_Reset_Click(object sender, EventArgs e) { XFile.LoadFileandFolded(treeView2.Tag.ToString(), treeView2); }