Beispiel #1
0
        public override bool Equals(object obj)
        {
            if (obj == null) // check if its null
            {
                return(false);
            }

            if (this.GetType() != obj.GetType()) // check if the type is the same
            {
                return(false);
            }

            HotKeyModifiers modifiers = (HotKeyModifiers)obj;

            if (modifiers == null) // check if it can be casted
            {
                return(false);
            }

            if (modifiers.ModifiersName == this.ModifiersName)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        public bool Equals(HotKeyModifiers modifiers)
        {
            if (modifiers == null) // check if it can be casted
            {
                return(false);
            }

            if (modifiers.ModifiersName == this.ModifiersName)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #3
0
 public HotKey(HotKeyModifiers modifiers, Keys key)
 {
     _modifiers = modifiers;
     _key       = key;
 }
Beispiel #4
0
 public HotKey(bool alt, bool ctrl, bool shift, bool win, Keys key)
 {
     _modifiers = new HotKeyModifiers(alt, ctrl, shift, win);
     _key       = key;
 }