コード例 #1
0
        /// <summary>
        /// Creates a instance of CorsairLedColor
        /// </summary>
        /// <param name="ledColorNative">The native led color</param>
        internal CorsairLedColor(CorsairLedColorNative ledColorNative)
        {
            ledId = CorsairLedId.CLI_Invalid;
            r     = 0;
            g     = 0;
            b     = 0;

            native = ledColorNative;

            ApplyToManaged();
        }
コード例 #2
0
        /// <summary>
        /// Applies changes on the native instance to the object
        /// </summary>
        internal void ApplyToManaged()
        {
            if (native == null)
            {
                native = new CorsairLedColorNative();
            }

            ledId = native.ledId;
            r     = native.r;
            g     = native.g;
            b     = native.b;
        }
コード例 #3
0
        /// <summary>
        /// Applies changes on the object to the native instance
        /// </summary>
        internal void ApplyToNative()
        {
            if (native == null)
            {
                native = new CorsairLedColorNative();
            }

            native.ledId = ledId;
            native.r     = r;
            native.g     = g;
            native.b     = b;
        }