示例#1
0
        private void OnExecuteAutomationCommand(CommandContainerButton obj)
        {
            obj.NextValue();
            if (!string.IsNullOrEmpty(obj.CommandContainer.AutomationCommand.Values) && !obj.CommandContainer.AutomationCommand.ToggleValues)
            {
                obj.CommandContainer.AutomationCommand.PublishEvent(EventTopicNames.SelectAutomationCommandValue);
            }
            else
            {
                if (SelectedOrders.Any())
                {
                    foreach (var selectedOrder in SelectedOrders)
                    {
                        _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new
                        {
                            Ticket = SelectedTicket,
                            Order  = selectedOrder,
                            AutomationCommandName = obj.Name,
                            Value = obj.SelectedValue
                        });
                    }
                }
                else
                {
                    _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new
                    {
                        Ticket = SelectedTicket,
                        AutomationCommandName = obj.Name,
                        Value = obj.SelectedValue
                    });
                }

                _ticketOrdersViewModel.SelectedTicket = SelectedTicket;
                ClearSelectedItems();
                ClearSelection = true;
                RefreshVisuals();
                if (SelectedTicket != Ticket.Empty)
                {
                    EventServiceFactory.EventService.PublishEvent(EventTopicNames.RefreshSelectedTicket);
                }
            }
        }
示例#2
0
 private void OnExecuteAutomationCommand(CommandContainerButton obj)
 {
     obj.NextValue();
     _automationService.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new { Ticket = SelectedTicket, AutomationCommandName = obj.Name, Value = obj.SelectedValue });
 }
示例#3
0
 private bool CanExecuteAutomationCommand(CommandContainerButton arg)
 {
     return(arg.IsEnabled && arg.CommandContainer.CanExecute(SelectedTicket) && _expressionService.EvalCommand(FunctionNames.CanExecuteAutomationCommand, arg.CommandContainer.AutomationCommand, new { Ticket = SelectedTicket }, true));
 }
示例#4
0
        private void OnExecuteAutomationCommand(CommandContainerButton obj)
        {
            obj.NextValue();
            if (!string.IsNullOrEmpty(obj.CommandContainer.AutomationCommand.Values) && !obj.CommandContainer.AutomationCommand.ToggleValues)
                obj.CommandContainer.AutomationCommand.PublishEvent(EventTopicNames.SelectAutomationCommandValue);
            else
            {
                if (SelectedOrders.Any())
                {
                    foreach (var selectedOrder in SelectedOrders)
                    {
                        _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new
                        {
                            Ticket = SelectedTicket,
                            Order = selectedOrder,
                            AutomationCommandName = obj.Name,
                            Value = obj.SelectedValue
                        });
                    }
                }
                else
                {
                    _applicationState.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new
                    {
                        Ticket = SelectedTicket,
                        AutomationCommandName = obj.Name,
                        Value = obj.SelectedValue
                    });
                }

                _ticketOrdersViewModel.SelectedTicket = SelectedTicket;
                ClearSelectedItems();
                ClearSelection = true;
                RefreshVisuals();
                if (SelectedTicket != Ticket.Empty)
                {
                    EventServiceFactory.EventService.PublishEvent(EventTopicNames.RefreshSelectedTicket);
                }
            }
        }
示例#5
0
 private bool CanExecuteAutomationCommand(CommandContainerButton arg)
 {
     return arg.IsEnabled;
 }
示例#6
0
 private bool CanExecuteAutomationCommand(CommandContainerButton arg)
 {
     return arg.IsEnabled && arg.CommandContainer.CanExecute(SelectedTicket) && _expressionService.EvalCommand(FunctionNames.CanExecuteAutomationCommand, arg.CommandContainer.AutomationCommand, new { Ticket = SelectedTicket }, true);
 }
 private void OnExecuteAutomationCommand(CommandContainerButton obj)
 {
     ExecuteAutomationCommand(obj.CommandContainer.AutomationCommand, obj.SelectedValue, obj.GetNextValue());
     obj.NextValue();
 }
示例#8
0
 private void OnExecuteAutomationCommand(CommandContainerButton obj)
 {
     obj.NextValue();
     ExecuteAutomationCommand(obj.CommandContainer.AutomationCommand, obj.SelectedValue);
 }
示例#9
0
 private void OnExecuteAutomationCommand(CommandContainerButton obj)
 {
     obj.NextValue();
     _automationService.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new { Ticket = SelectedTicket, AutomationCommandName = obj.Name, Value = obj.SelectedValue });
 }
示例#10
0
 private bool CanExecuteAutomationCommand(CommandContainerButton arg)
 {
     return(arg.IsEnabled);
 }