Exemple #1
0
        public Hotkey(Keys keyCode, bool shift, bool control, bool alt)
        {
            // Assign properties
            Key = new KeyAndModifiers(keyCode, shift, control, alt);

            // Register us as a message filter
            Application.AddMessageFilter(this);
        }
Exemple #2
0
 public AudioHotkey(KeyAndModifiers fullKey, Guid audioDevice, string files, float volume, int timeStart = 0, string name = "")
     : base(fullKey)
 {
     this.AudioDevice  = audioDevice;
     this.Files        = files;
     this.StartingTime = timeStart;
     this.Name         = name;
     this.Volume       = volume;
 }
Exemple #3
0
 /// <param name="fullKey">Determines the key and modifiers used by the hotkey. Can be empty but not null.</param>
 public Hotkey(string fullKey)
 {
     if (fullKey == null)
     {
         throw new ArgumentNullException(nameof(fullKey), "Fullkey can be empty but not null.");
     }
     Key = new KeyAndModifiers(fullKey);
     Application.AddMessageFilter(this);
 }
Exemple #4
0
 public ControlHotkey(KeyAndModifiers fullKey, ControlRoles role)
     : base(fullKey)
 {
     this.Role = role;
 }
Exemple #5
0
 public Hotkey(KeyAndModifiers fullKey)
 {
     Key = fullKey;
     Application.AddMessageFilter(this);
 }