private void OnSelectedOrdersDataEvent(EventParameters <SelectedOrdersData> selectedOrdersEvent)
        {
            if (selectedOrdersEvent.Topic == EventTopicNames.SelectedOrdersChanged)
            {
                _selectedOrders = selectedOrdersEvent.Value.SelectedOrders.ToList();

                if (_selectedOrdersViewModel.ShouldDisplay(selectedOrdersEvent.Value.Ticket, _selectedOrders))
                {
                    DisplayTicketDetailsScreen();
                }
                else if (_productTimerEditorViewModel.ShouldDisplay(selectedOrdersEvent.Value.Ticket, _selectedOrders.ToList()))
                {
                    DisplayProdcutTimerEdior(_selectedOrders.First());
                }
            }
        }
Exemple #2
0
        private void OnSelectedOrdersDataEvent(EventParameters <OperationRequest <SelectedOrdersData> > selectedOrdersEvent)
        {
            if (selectedOrdersEvent.Topic == EventTopicNames.DisplayTicketOrderDetails)
            {
                _selectedOrders = selectedOrdersEvent.Value.SelectedItem.SelectedOrders.ToList();

                if (_selectedOrdersViewModel.ShouldDisplay(selectedOrdersEvent.Value.SelectedItem.Ticket, _selectedOrders))
                {
                    DisplayTicketDetailsScreen(selectedOrdersEvent.Value);
                }
                else if (_productTimerEditorViewModel.ShouldDisplay(selectedOrdersEvent.Value.SelectedItem.Ticket, _selectedOrders.ToList()))
                {
                    DisplayProdcutTimerEdior(_selectedOrders.First());
                }
                else
                {
                    EventServiceFactory.EventService.PublishEvent(EventTopicNames.RefreshSelectedTicket);
                }
            }
        }