public void RemoveMapping(ICommandMapping mapping) { if (_mappingsByCommand.ContainsKey(mapping.CommandClass)) { DeleteMapping(mapping); if (_mappings.Count == 0) { _trigger.Deactivate(); } } }
private ICommandTrigger DestroyTrigger(object key) { if (!_triggers.ContainsKey(key)) { return(null); } ICommandTrigger trigger = _triggers [key]; trigger.Deactivate(); _triggers.Remove(key); return(trigger); }