public CommandBinding(Command _source, Func<bool> enabled, params Action[] _destinations) { this.source = _source; this.source.AddBinding(this); this.destinations = _destinations.Select(x => new Command { Action = x }).ToArray(); this.enabled = enabled; }
public CommandBinding(Command _source, Func<bool> enabled, params Command[] _destinations) { this.source = _source; this.source.AddBinding(this); this.destinations = _destinations; this.enabled = enabled; }
public void Delete() { this.Enabled = false; this.source.RemoveBinding(this); this.source = null; this.destinations = null; this.enabled = null; }
public CommandBinding(Command _source, params Action[] _destinations) : this(_source, () => true, _destinations) { }