Inheritance: System.EventArgs
Ejemplo n.º 1
0
        private void OnHalDeviceAdded(IntPtr ctx, IntPtr udiPtr)
        {
            foreach(DeviceAddedHandler addedHandler in GetEvents(typeof(DeviceAddedHandler))) {
                DeviceAddedHandler handler = addedHandler;

                if(handler != null) {
                    string udi = UnixMarshal.PtrToString(udiPtr);
                    DeviceAddedArgs args = new DeviceAddedArgs();
                    args.Device = new Device(this, udi);
                    handler(this, args);
                }
            }
        }
Ejemplo n.º 2
0
 private void OnDeviceAdded(object o, DeviceAddedArgs args)
 {
     if (IsIPod (args.Device)) {
         MaybeAddVolume (new Volume (args.Udi));
     }
 }