Beispiel #1
0
		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;
		}
Beispiel #2
0
		public CommandBinding(Command _source, Func<bool> enabled, params Command[] _destinations)
		{
			this.source = _source;
			this.source.AddBinding(this);
			this.destinations = _destinations;
			this.enabled = enabled;
		}
Beispiel #3
0
		public void Delete()
		{
			this.Enabled = false;
			this.source.RemoveBinding(this);
			this.source = null;
			this.destinations = null;
			this.enabled = null;
		}
Beispiel #4
0
		public CommandBinding(Command _source, params Action[] _destinations)
			: this(_source, () => true, _destinations)
		{
		}