Esempio n. 1
0
        public void EnqueueKey(SettingsKeyboardKey key, bool keyDown)
        {
            KeyInformation info = new KeyInformation();

            info.Key     = key;
            info.KeyDown = keyDown;
            lock (_keyQueue)
            {
                _keyQueue.Clear();
                _keyQueue.Add(info);
                if (info.KeyDown)
                {
                    WriteStatusMessage("Queueing keystroke: " + key.ToString());
                }
            }
            //ProcessKeyInfo(info);
        }
Esempio n. 2
0
        public bool Equals(SettingsKeyboardKey obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (_keyCodes.Count != obj._keyCodes.Count)
            {
                return(false);
            }

            for (int i = 0; i < _keyCodes.Count; i++)
            {
                if (_keyCodes[i] != obj._keyCodes[i])
                {
                    return(false);
                }
            }

            return(true);
        }