예제 #1
0
 // this method sniffs its parameter drives.
 private void SniffRemovableDrives(List<DriveInfo> RemovableDrives)
 {
     foreach (DriveInfo insertedDrive in RemovableDrives)
       {
     if (insertedDrive.IsReady)
     {
       sniffer = new Sniffer(insertedDrive, BlackBoxLocation, SniffingFormats);
       sniffer.StartSniffing();
     }
       }
 }
예제 #2
0
 // this is the manual sniff button, the user selects a removable drive from the
 // RemovableDrives_ComboBox.
 // NOTE: this button will remain disabled till there is:
 // 1- an existant black box.
 // 2- there's at least one format in the SniffingFormats list.
 private void SniffDrive_Button_Click(object sender, EventArgs e)
 {
     DriveInfo SelectedDrive = new DriveInfo(RemovableDrives_ComboBox.SelectedItem.ToString());
       if (!SelectedDrive.IsReady)
       {
     MessageBox.Show("The Drive you selected is not ready.\r\nMake sure that it's a valid removable drive and it's ready for writing/reading operations.", "Drive Not Ready");
     return;
       }
       sniffer = new Sniffer(SelectedDrive, BlackBoxLocation, SniffingFormats);
       sniffer.StartSniffing();
 }