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); } } }
private void OnExecuteAutomationCommand(CommandContainerButton obj) { obj.NextValue(); _automationService.NotifyEvent(RuleEventNames.AutomationCommandExecuted, new { Ticket = SelectedTicket, AutomationCommandName = obj.Name, Value = obj.SelectedValue }); }
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); } } }
private void OnExecuteAutomationCommand(CommandContainerButton obj) { ExecuteAutomationCommand(obj.CommandContainer.AutomationCommand, obj.SelectedValue, obj.GetNextValue()); obj.NextValue(); }
private void OnExecuteAutomationCommand(CommandContainerButton obj) { obj.NextValue(); ExecuteAutomationCommand(obj.CommandContainer.AutomationCommand, obj.SelectedValue); }