Beispiel #1
0
 public void StopListenForChanges()
 {
     if (_watcher != null)
     {
         _watcher.Dispose();
         _watcher = null;
     }
 }
Beispiel #2
0
 protected override void internal_dispose()
 {
     drive_notifier.DeviceArrived -= drive_notifier_DeviceArrived;
     //drive_notifier.DeviceArrived
     drive_notifier.DeviceRemoved -= drive_notifier_DeviceRemoved;
     //drive_notifier.DeviceRemoved = null;
     drive_notifier.Dispose();
     drive_notifier = null;
     internal_list.Clear();
 }
Beispiel #3
0
 private void UnRegisterDriveDetector()
 {
     try
     {
         _driveDetector.DeviceArrived -= _driveDetector_DeviceArrived;
         //_driveDetector.QueryRemove -= _driveDetector_QueryRemove;
         _driveDetector.DeviceRemoved       -= _driveDetector_DeviceRemoved;
         _driveDetector.DeviceStatusChanged -= _driveDetector_DeviceStatusChanged;
         _driveDetector.Dispose();
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #4
0
 private void FormSDCard_FormClosing(object sender, FormClosingEventArgs e)
 {
     driveDetector.Dispose();
 }