예제 #1
0
파일: Form1.cs 프로젝트: szp11/copyFile2Usb
        public void updateInfoUSBList(DriveInfo[] Drives, List <volume_name> List_Conllection)
        {
            List <volume_name> list_conllection = List_Conllection;

            if (list_conllection != null)
            {
                list_conllection.Clear();
            }
            DriveInfo[] dirves = Drives;
            volume_name stru_VolNam;

            foreach (DriveInfo d in dirves)
            {
                if (d.DriveType == DriveType.Removable && d.IsReady == true)
                {
                    stru_VolNam        = new volume_name();
                    stru_VolNam.Name   = d.RootDirectory.ToString();
                    stru_VolNam.Volume = d.VolumeLabel;
                    list_conllection.Add(stru_VolNam);
                }
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: heran/copyFile2Usb
 public void updateInfoUSBList(DriveInfo[] Drives,List<volume_name> List_Conllection)
 {
     List<volume_name> list_conllection = List_Conllection;
     if(list_conllection!=null)
         list_conllection.Clear();
     DriveInfo[] dirves=Drives ;
     volume_name stru_VolNam;
     foreach (DriveInfo d in dirves)
     {
         if (d.DriveType == DriveType.Removable && d.IsReady == true)
         {
             stru_VolNam = new volume_name();
             stru_VolNam.Name = d.RootDirectory.ToString();
             stru_VolNam.Volume = d.VolumeLabel;
             list_conllection.Add(stru_VolNam);
         }
     }
 }