Exemplo n.º 1
0
//C++ TO C# CONVERTER WARNING: 'const' methods are not available in C#:
//ORIGINAL LINE: void printConnectionEvent(const CorsairDeviceConnectionStatusChangedEvent *e) const
        private void printConnectionEvent(CorsairDeviceConnectionStatusChangedEvent e)
        {
            Console.Write("Device id: ");
            Console.Write(e.deviceId);
            Console.Write("   Status: ");
            Console.Write((e.isConnected ? "connected" : "disconnected"));
            Console.Write("\n");
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a instance of CorsairEvent
        /// </summary>
        /// <param name="eventNative">The native event</param>
        internal CorsairEvent(CorsairEventNative eventNative)
        {
            native = eventNative;
            id     = eventNative.id;

            if (id == CorsairEventId.CEI_KeyEvent)
            {
                keyEvent = native.keyEvent;
            }
            else if (id == CorsairEventId.CEI_DeviceConnectionStatusChangedEvent)
            {
                deviceConnectionStatusChangedEvent = native.deviceConnectionStatusChangedEvent;
            }
        }