标题:在下面的“文件管理器”的程序代码中 方法FillFileView(string FullName) 写 ...
只看楼主
ghl1234
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2011-9-22
结帖率:75%
 问题点数:0 回复次数:0 
在下面的“文件管理器”的程序代码中 方法FillFileView(string FullName) 写在什么地方???
using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using

namespace FileManager
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            try
            {
                this.txtCurpath.Text = "My Computer";
                this.FileView1.Clear();
                this.FileView1.View = View.Details;
                this.FileView1.Columns.Add("本地磁盘", Width / 3, HorizontalAlignment.Left);
                string[] Drv = Directory.GetLogicalDrives();
                int DrvCnt = Drv.Length;
                for (int i = 0; i < DrvCnt; i++)
                {
                    ListViewItem lvi = new ListViewItem();
                    this.FileView1.Items.Add(lvi);
                    lvi.Text = "驱动器" + Drv[i];
                    lvi.ImageIndex = 2;
                    lvi.Tag = Drv[i];}
        }
                  catch (Exception ex)
            {
                MessageBox.Show(ex.Message);}}
      
            private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void FileView1_SelectedIndexChanged(object sender, EventArgs e)
        {  
        }
        
        private void btnUp_Click(object sender, EventArgs e)
        {

        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }
      
    }}
其中 FillFileView(string FullName) 方法是以当前目录的全路径为输入参数,显示当前目录下的所有文件和文件夹,并把它们填充到ListView中  
但是我不知道写在程序的什么地方 ,试了好几遍都出错。
求 高手们给看看 谢谢了啊
搜索更多相关主题的帖子: class public 文件管理器 using 
2011-10-15 22:16



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-352555-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.043132 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved