BlinkStickDotNet.WinUsbDeviceMonitor.OnDeviceListChanged C# (CSharp) Метод

OnDeviceListChanged() защищенный Метод

Raises the device list changed event.
protected OnDeviceListChanged ( ) : void
Результат void
		protected void OnDeviceListChanged()
		{
			if (DeviceListChanged != null)
			{
				DeviceListChanged(this, new EventArgs());
			}
		}

Usage Example

Пример #1
0
            const int DBT_DEVTYP_VOLUME        = 0x00000002;  // logical volume

            //[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
            protected override void WndProc(ref Message m)
            {
                if (m.Msg == WM_DEVICECHANGE &&
                    (m.WParam.ToInt32() == DBT_DEVICEARRIVAL ||
                     m.WParam.ToInt32() == DBT_DEVICEREMOVECOMPLETE ||
                     m.WParam.ToInt32() == DBT_DEVNODES_CHANGED))
                {
                    if (this.Enabled)
                    {
                        Monitor.OnDeviceListChanged();
                    }
                }

                base.WndProc(ref m);
            }