Ejemplo n.º 1
0
        private void RaiseCommandTargetRequested(Command command)
        {
            // Creates the event args and raises the event.
            CommandTargetRequestedEventArgs e = new CommandTargetRequestedEventArgs(command, new List <Thing>(command.TargetObjects), ExecuteWherigoCommandOnTarget);

            if (CommandTargetRequested == null)
            {
                throw new InvalidOperationException("No event handler for CommandTargetRequested is registered!");
            }
            else
            {
                CommandTargetRequested(this, e);
            }
        }
Ejemplo n.º 2
0
		private void RaiseCommandTargetRequested(Command command)
		{
			// Creates the event args and raises the event.
			CommandTargetRequestedEventArgs e = new CommandTargetRequestedEventArgs(command, new List<Thing>(command.TargetObjects), ExecuteWherigoCommandOnTarget);
			if (CommandTargetRequested == null)
			{
				throw new InvalidOperationException("No event handler for CommandTargetRequested is registered!");
			}
			else
			{
				CommandTargetRequested(this, e);
			}
		}