예제 #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;
 }
예제 #2
0
 public BasicTeraData(string resourceDirectory)
 {
     ResourceDirectory = resourceDirectory;
     HotkeysData       = new HotkeysData(this);
     _dataForRegion    = Memoize <string, TeraData>(region => new TeraData(this, region));
     Servers           = GetServers(Path.Combine(ResourceDirectory, "servers.txt")).ToList();
     Regions           = GetRegions(Path.Combine(ResourceDirectory, "regions.txt")).ToList();
 }
예제 #3
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.");
        }
예제 #4
0
 internal KeyPressedEventArgs(HotkeysData.ModifierKeys modifier, Keys key)
 {
     Modifier = modifier;
     Key = key;
 }