상속: System.EventArgs
예제 #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));
                    }
                }
            }
        }
예제 #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));
                    }
                }
            }
        }
예제 #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));
                }
        }
예제 #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));
                }
            }
        }