Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            FlashLights.OpenKeyboardDevice();
            while (true)
            {
                var    layout       = GetCurrentKeyboardLayout();
                string layoutString = layout.ToString();
                Console.WriteLine(layoutString);

                if (layoutString == "en-US")
                {
                    FlashLights.FlashKeyboardLight(1, 1500, 0);
                }
                else
                {
                    FlashLights.FlashKeyboardLight(1, 1500, 1);
                }
                Thread.Sleep(25);
            }
            FlashLights.Close();
        }
Ejemplo n.º 2
0
        ///<inheritdoc/>
        public override int GetHashCode()
        {
            int hash = 17;

            // Overflow is fine, just wrap
            unchecked
            {
                hash = (hash * 29) + PaintScheme.GetHashCode();
                hash = (hash * 29) + Health.GetHashCode();
                hash = (hash * 29) + Compliance.GetHashCode();
                hash = (hash * 29) + FlashLights.GetHashCode();
                hash = (hash * 29) + LifeFormState.GetHashCode();
                hash = (hash * 29) + FrozenStatus.GetHashCode();
                hash = (hash * 29) + State.GetHashCode();
                hash = (hash * 29) + Weapon1.GetHashCode();
                hash = (hash * 29) + Weapon2.GetHashCode();
                hash = (hash * 29) + CamouflageType.GetHashCode();
                hash = (hash * 29) + ConcealedStationary.GetHashCode();
                hash = (hash * 29) + ConcealedMovement.GetHashCode();
            }

            return(hash);
        }