コード例 #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            DirectoryInfo dir = new DirectoryInfo(path);

            FileInfo[]      fichiers = dir.GetFiles();
            DirectoryInfo[] dossiers = dir.GetDirectories();

            progressBar1.Maximum = dir.GetDirectories().Length;
            listFiche            = new List <SearchWIndow.Fiche>();
            listerFiche(fichiers);

            foreach (DirectoryInfo dossier in dossiers)
            {
                progressBar1.Value++;
                fichiers = dossier.GetFiles();
                listerFiche(fichiers);
            }

            SearchWIndow w = new SearchWIndow(path, listFiche);

            this.Hide();
            w.ShowDialog();
        }
コード例 #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            DirectoryInfo dir = new DirectoryInfo(path);
            FileInfo[] fichiers = dir.GetFiles();
            DirectoryInfo[] dossiers = dir.GetDirectories();

            progressBar1.Maximum = dir.GetDirectories().Length;
            listFiche = new List<SearchWIndow.Fiche>();
            listerFiche(fichiers);

            foreach (DirectoryInfo dossier in dossiers)
            {
                progressBar1.Value++;
                fichiers = dossier.GetFiles();
                listerFiche(fichiers);
            }

            SearchWIndow w = new SearchWIndow(path, listFiche);
            this.Hide();
            w.ShowDialog();
        }