Beispiel #1
0
        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);
                }
            }
        }
Beispiel #2
0
 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);
         }
     }
 }