예제 #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);
            }
        }
예제 #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);
            }
        }
예제 #3
0
 public HotKey(HotKeyModifiers modifiers, Keys key)
 {
     _modifiers = modifiers;
     _key       = key;
 }
예제 #4
0
 public HotKey(bool alt, bool ctrl, bool shift, bool win, Keys key)
 {
     _modifiers = new HotKeyModifiers(alt, ctrl, shift, win);
     _key       = key;
 }