Exemple #1
0
 public CopyKey(string header, string footer, string content, HotkeysData.ModifierKeys modifier, Keys key)
 {
     Content  = content;
     Header   = header;
     Footer   = footer;
     Modifier = modifier;
     Key      = key;
 }
Exemple #2
0
        /// <summary>
        ///     Registers a hot key in the system.
        /// </summary>
        /// <param name="modifier">The modifiers that are associated with the hot key.</param>
        /// <param name="key">The key itself that is associated with the hot key.</param>
        public void RegisterHotKey(HotkeysData.ModifierKeys modifier, Keys key)
        {
            // increment the counter.
            _currentId = _currentId + 1;

            // register the hot key.
            if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key))
            {
                throw new InvalidOperationException("Couldn’t register the hot key.");
            }
        }
Exemple #3
0
 public CopyKey(string header, string footer, string content, HotkeysData.ModifierKeys modifier, Keys key,
                string orderBy, string order, string lowDpsContent, int lowDpsThreshold)
 {
     Content         = content;
     Header          = header;
     Footer          = footer;
     Modifier        = modifier;
     Key             = key;
     OrderBy         = orderBy;
     Order           = order;
     LowDpsContent   = lowDpsContent;
     LowDpsThreshold = lowDpsThreshold;
 }
Exemple #4
0
        /// <summary>
        ///     Registers a hot key in the system.
        /// </summary>
        /// <param name="modifier">The modifiers that are associated with the hot key.</param>
        /// <param name="key">The key itself that is associated with the hot key.</param>
        public void RegisterHotKey(HotkeysData.ModifierKeys modifier, Keys key)
        {
            if (key == Keys.None)
            {
                return; //allow disable hotkeys using "None" key
            }
            // increment the counter.
            _currentId++;

            // register the hot key.
            if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key))
            {
            }
        }
Exemple #5
0
        /// <summary>
        ///     Registers a hot key in the system.
        /// </summary>
        /// <param name="modifier">The modifiers that are associated with the hot key.</param>
        /// <param name="key">The key itself that is associated with the hot key.</param>
        public void RegisterHotKey(HotkeysData.ModifierKeys modifier, Keys key)
        {
            if (key == Keys.None)
            {
                return; //allow disable hotkeys using "None" key
            }
            // increment the counter.
            _currentId++;

            // register the hot key.
            if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key))
            {
                MessageBox.Show(LP.RegisterHotKeyError + " " + key + LP.AlreadyInUse);
            }
        }
Exemple #6
0
        /// <summary>
        ///     Registers a hot key in the system.
        /// </summary>
        /// <param name="modifier">The modifiers that are associated with the hot key.</param>
        /// <param name="key">The key itself that is associated with the hot key.</param>
        public void RegisterHotKey(HotkeysData.ModifierKeys modifier, Keys key)
        {
            if (key == Keys.None)
            {
                return;                  //allow disable hotkeys using "None" key
            }
            // increment the counter.
            _currentId++;

            // register the hot key.
            if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key))
            {
                throw new InvalidOperationException("Couldn’t register the hot key.");
            }
        }
Exemple #7
0
 public HotKey(Keys k, HotkeysData.ModifierKeys m) : this()
 {
     Key      = k;
     Modifier = m;
 }
Exemple #8
0
 internal KeyPressedEventArgs(HotkeysData.ModifierKeys modifier, Keys key)
 {
     Modifier = modifier;
     Key      = key;
 }