예제 #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);
 }