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