示例#1
0
        void OnDeviceUpdate(OmDeviceEventArgs e)
        {
            OmDevice device = e.Device;

            /*
             * if (!devices.ContainsKey(e.Device.DeviceId))
             * {
             *  devices[e.Device.DeviceId] = new Device(e.Device);
             * }
             * Device device = devices[e.Device.DeviceId];
             */
            if (DeviceUpdate != null)
            {
                DeviceUpdate(this, new DeviceEventArgs(device, e));
            }
        }
示例#2
0
 void om_DeviceRemoved(object sender, OmDeviceEventArgs e)
 {
     Console.WriteLine("REMOVED: " + e.Device.DeviceId);
     OnDeviceUpdate(e);
 }
示例#3
0
 void om_DeviceAttached(object sender, OmDeviceEventArgs e)
 {
     Console.WriteLine("ATTACHED: " + e.Device.DeviceId);
     OnDeviceUpdate(e);
 }
示例#4
0
 void om_DeviceChanged(object sender, OmDeviceEventArgs e)
 {
     //Console.WriteLine("CHANGED: " + e.Device.DeviceId);
     OnDeviceUpdate(e);
 }
示例#5
0
 public DeviceEventArgs(OmDevice device, OmDeviceEventArgs omEvent)
 {
     Device  = device;
     OmEvent = omEvent;
 }
 void OnDeviceUpdate(OmDeviceEventArgs e)
 {
     OmDevice device = e.Device;
     /*
     if (!devices.ContainsKey(e.Device.DeviceId))
     {
         devices[e.Device.DeviceId] = new Device(e.Device);
     }
     Device device = devices[e.Device.DeviceId];
     */
     if (DeviceUpdate != null)
     {
         DeviceUpdate(this, new DeviceEventArgs(device, e));
     }
 }
 void om_DeviceRemoved(object sender, OmDeviceEventArgs e)
 {
     Console.WriteLine("REMOVED: " + e.Device.DeviceId);
     OnDeviceUpdate(e);
 }
 void om_DeviceChanged(object sender, OmDeviceEventArgs e)
 {
     //Console.WriteLine("CHANGED: " + e.Device.DeviceId);
     OnDeviceUpdate(e);
 }
 void om_DeviceAttached(object sender, OmDeviceEventArgs e)
 {
     Console.WriteLine("ATTACHED: " + e.Device.DeviceId);
     OnDeviceUpdate(e);
 }
 public DeviceEventArgs(OmDevice device, OmDeviceEventArgs omEvent)
 {
     Device = device;
     OmEvent = omEvent;
 }