コード例 #1
0
 private void RefreshOnWmiEvent(Win32UsbControllerDevice win32UsbControllerDevice)
 {
     if (this.RefreshListOnWmiEvents && !String.IsNullOrEmpty(win32UsbControllerDevice.DeviceId) && (win32UsbControllerDevice.DeviceId.IndexOf("&MI_", StringComparison.CurrentCultureIgnoreCase) < 0))
     {
         this.Refresh(this.SelectConnectedDevice ? win32UsbControllerDevice.DeviceId : null);
     }
 }
コード例 #2
0
ファイル: DeviceEvent.cs プロジェクト: vurdalakov/usbdevices
 public DeviceEvent(Int32 eventType, Win32UsbControllerDevice win32UsbControllerDevice)
 {
     this.Time         = DateTime.Now;
     this.EventType    = eventType;
     this.Vid          = win32UsbControllerDevice.Vid;
     this.Pid          = win32UsbControllerDevice.Pid;
     this.HubAndPort   = Helpers.MakeHubAndPort(win32UsbControllerDevice.Hub, win32UsbControllerDevice.Port);
     this.DeviceId     = win32UsbControllerDevice.DeviceId;
     this.ControllerId = win32UsbControllerDevice.ControllerId;
 }