Exemple #1
0
 private void OnUsbOnDeviceRemoved(object sender, UsbDetectorEventArgs e)
 {
     if (deviceConnectedForm != null)
     {
         deviceConnectedForm.Close();
     }
 }
Exemple #2
0
 private void OnUsbOnDeviceAttached(object sender, UsbDetectorEventArgs e)
 {
     if (deviceConnectedForm == null)
     {
         deviceConnectedForm         = new DeviceConnected();
         deviceConnectedForm.Closed += (a, b) => { deviceConnectedForm = null; };
         deviceConnectedForm.Show();
     }
     else
     {
         deviceConnectedForm.Activate();
     }
 }
Exemple #3
0
 private void OnUsbOnDeviceAttached(object sender, UsbDetectorEventArgs e)
 {
     if (deviceConnectedForm == null)
     {
         deviceConnectedForm = new DeviceConnected();
         deviceConnectedForm.Closed += (a, b) => { deviceConnectedForm = null; };
         deviceConnectedForm.Show();
     }
     else
     {
         deviceConnectedForm.Activate();
     }
 }
Exemple #4
0
 private void OnUsbOnDeviceRemoved(object sender, UsbDetectorEventArgs e)
 {
     if (deviceConnectedForm != null)
     {
         deviceConnectedForm.Close();
     }
 }