示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //FolderBrowserDialog fbd = new FolderBrowserDialog();
            //fbd.ShowDialog();
            //string path = fbd.SelectedPath;
            string path = @"D:\娱乐\movie";

            if (path.Length > 0)
            {
                VideoUtil myMpeg;
                VideoInfo vi;

                string[] files = Directory.GetFiles(path);
                listBox1.Items.Clear();
                foreach (string file in files)
                {
                    myMpeg = new VideoUtil(file);
                    vi     = myMpeg.GetVideoInfo();

                    listBox1.Items.Add(null == vi ? file + " 无法识别!": vi.ToString());
                }
            }
        }