private void OnDeviceAdded(object o, DeviceAddedArgs args)
        {
            lock (this) {
                DeviceAddedHandler handler = DeviceAdded;
                if (handler != null)
                {
                    DeviceAddedArgs raise_args  = args;
                    IDevice         cast_device = CastToCustomDevice <IDevice> (args.Device);

                    if (cast_device != args.Device)
                    {
                        raise_args = new DeviceAddedArgs(cast_device);
                    }

                    handler(this, raise_args);
                }
            }
        }
Esempio n. 2
0
 private void OnHardwareDeviceAdded (object o, DeviceAddedArgs args)
 {
     MapDevice (args.Device);
 }
Esempio n. 3
0
 private void OnHardwareDeviceAdded(object o, DeviceAddedArgs args)
 {
     lock (this) {
         if (args.Device is ICdromDevice) {
             MapDiscDevice ((ICdromDevice)args.Device);
         } else if (args.Device is IDiscVolume) {
             MapDiscVolume ((IDiscVolume)args.Device);
         }
     }
 }