Ejemplo n.º 1
0
 /// <summary>
 /// Raises the <see cref="KeyboardDisconnected"/> event.
 /// </summary>
 /// <param name="sender">The <see cref="USBHost"/> object that raised the event.</param>
 /// <param name="Keyboard">The <see cref="USBH_Keyboard"/> object associated with the event.</param>
 protected virtual void OnKeyboardDisconnectedEvent(USBHost sender, USBH_Keyboard Keyboard)
 {
     if (_OnKeyboardDisconnected == null)
     {
         _OnKeyboardDisconnected = new KeyboardDisconnectedEventHandler(OnKeyboardDisconnectedEvent);
     }
     if (Program.CheckAndInvoke(KeyboardDisconnected, _OnKeyboardDisconnected, sender, Keyboard))
     {
         KeyboardDisconnected(sender, Keyboard);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Raises the <see cref="USBDriveDisconnected"/> event.
 /// </summary>
 /// <param name="sender">The <see cref="USBHost"/> object that raised the event.</param>
 protected virtual void OnUSBDriveDisconnectedEvent(USBHost sender)
 {
     if (_OnUSBDriveDisconnected == null)
     {
         _OnUSBDriveDisconnected = new USBDriveDisconnectedEventHandler(OnUSBDriveDisconnectedEvent);
     }
     if (Program.CheckAndInvoke(USBDriveDisconnected, _OnUSBDriveDisconnected, sender))
     {
         USBDriveDisconnected(sender);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Raises the <see cref="MouseDisconnected"/> event.
 /// </summary>
 /// <param name="sender">The <see cref="USBHost"/> object that raised the event.</param>
 /// <param name="mouse">The <see cref="USBH_Mouse"/> object associated with the event.</param>
 protected virtual void OnMouseDisconnectedEvent(USBHost sender, USBH_Mouse mouse)
 {
     if (_OnMouseDisconnected == null)
     {
         _OnMouseDisconnected = new MouseDisconnectedEventHandler(OnMouseDisconnectedEvent);
     }
     if (Program.CheckAndInvoke(MouseDisconnected, _OnMouseDisconnected, sender, mouse))
     {
         MouseDisconnected(sender, mouse);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Raises the <see cref="USBDriveConnected"/> event.
 /// </summary>
 /// <param name="sender">The <see cref="USBHost"/> object that raised the event.</param>
 /// <param name="storageDevice">The <see cref="T:Microsoft.Gadgeteer.StorageDevice"/> object associated with the connected USB drive.</param>
 protected virtual void OnUSBDriveConnectedEvent(USBHost sender, StorageDevice storageDevice)
 {
     if (_OnUSBDriveConnected == null)
     {
         _OnUSBDriveConnected = new USBDriveConnectedEventHandler(OnUSBDriveConnectedEvent);
     }
     if (Program.CheckAndInvoke(USBDriveConnected, _OnUSBDriveConnected, sender, storageDevice))
     {
         USBDriveConnected(sender, storageDevice);
     }
 }
Ejemplo n.º 5
0
        private void OnKeyboardConnected(USBHost sender, Keyboard keyboard)
        {
            if (this.onKeyboardConnected == null)
            {
                this.onKeyboardConnected = this.OnKeyboardConnected;
            }

            if (Program.CheckAndInvoke(this.KeyboardConnected, this.onKeyboardConnected, sender, keyboard))
            {
                this.KeyboardConnected(sender, keyboard);
            }
        }
Ejemplo n.º 6
0
        private void OnMouseConnected(USBHost sender, Mouse mouse)
        {
            if (this.onMouseConnected == null)
            {
                this.onMouseConnected = this.OnMouseConnected;
            }

            if (Program.CheckAndInvoke(this.MouseConnected, this.onMouseConnected, sender, mouse))
            {
                this.MouseConnected(sender, mouse);
            }
        }
Ejemplo n.º 7
0
        private void OnMassStorageUnmounted(USBHost sender, EventArgs e)
        {
            if (this.onMassStorageUnmounted == null)
            {
                this.onMassStorageUnmounted = this.OnMassStorageUnmounted;
            }

            if (Program.CheckAndInvoke(this.MassStorageUnmounted, this.onMassStorageUnmounted, sender, e))
            {
                this.MassStorageUnmounted(sender, e);
            }
        }
Ejemplo n.º 8
0
        private void OnMassStorageMounted(USBHost sender, StorageDevice device)
        {
            if (this.onMassStorageMounted == null)
            {
                this.onMassStorageMounted = this.OnMassStorageMounted;
            }

            if (Program.CheckAndInvoke(this.MassStorageMounted, this.onMassStorageMounted, sender, device))
            {
                this.MassStorageMounted(sender, device);
            }
        }