Inheritance: System.EventArgs
Ejemplo n.º 1
0
        private static void watcherWindow_DeviceArrived(object sender, DeviceWindowEventArgs e)
        {
            foreach (char dr in e.Drives)
            {
                if (IsIpodDrive(dr))
                {
                    IPod.Device device = new IPod.Device(dr + ":\\");
                    devices.Add(dr, device);

                    if (device_added != null)
                    {
                        device_added(null, new DeviceEventArgs(device));
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private static void watcherWindow_DeviceRemoved(object sender, DeviceWindowEventArgs e)
        {
            foreach (char dr in e.Drives)
            {
                if (devices.ContainsKey(dr))
                {
                    IPod.Device device = devices[dr];

                    devices.Remove(dr);

                    if (device_removed != null)
                    {
                        device_removed(null, new DeviceEventArgs(device));
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private static void watcherWindow_DeviceRemoved(object sender, DeviceWindowEventArgs e)
        {
            foreach (char dr in e.Drives)
                if (devices.ContainsKey (dr)) {

                    IPod.Device device = devices[dr];

                    devices.Remove (dr);

                    if (device_removed != null)
                        device_removed(null, new DeviceEventArgs(device));
                }
        }
Ejemplo n.º 4
0
        private static void watcherWindow_DeviceArrived(object sender, DeviceWindowEventArgs e)
        {
            foreach (char dr in e.Drives) {
                if (IsIpodDrive(dr))
                {
                    IPod.Device device = new IPod.Device(dr + ":\\");
                    devices.Add (dr, device);

                    if (device_added != null)
                        device_added (null, new DeviceEventArgs(device));
                }
            }
        }