Esempio n. 1
0
        static void Delete(ref List <FileDir> allListmain, int nomer)
        {
            FileDir b = allListmain[nomer - 1];
            int     h = b.DirFile;

            if (h == -1)
            {
                Directory.Delete(b.Name, true);
            }
            else
            {
                File.Delete(b.Name);
            }
            allListmain.RemoveRange(nomer - 1, 1);
        }
Esempio n. 2
0
        static void Delete(ref List <FileDir> allListmain, int First, int Last)
        {
            for (int i = First; i <= Last; i++)
            {
                FileDir b = allListmain[i - 1];
                int     h = b.DirFile;
                if (h == -1)
                {
                    Directory.Delete(b.Name, true);
                }
                else
                {
                    File.Delete(b.Name);
                }
            }

            allListmain.RemoveRange(First - 1, Last - First + 1);
        }