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