コード例 #1
0
        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();
            }
        }
コード例 #2
0
 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();
 }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
 private void btn_Reset_Click(object sender, EventArgs e)
 {
     XFile.LoadFileandFolded(treeView2.Tag.ToString(), treeView2);
 }