Esempio n. 1
0
 public override bool Equals(object obj)
 {
     if (obj == null || !(obj is Hotkey))
     {
         return(false);
     }
     else
     {
         Hotkey hotkey = (Hotkey)obj;
         return
             ((this._hotkeyName == hotkey.GetName()) &&
              (this._primaryHotkey.All(t => hotkey.GetPrimaryHotkey().Contains(t)) &&
               (hotkey.GetPrimaryHotkey().All(h => _primaryHotkey.Contains(h)))) &&
              (this._secondaryHotkey.All(s => hotkey.GetSecondaryHotkey().Contains(s)) &&
               (hotkey.GetSecondaryHotkey().All(shk => _secondaryHotkey.Contains(shk)))));
     }
 }