public bool HandleTextInput(string text) { if ((AppServices.ActiveAppScreen == AppScreens.TicketList || AppServices.ActiveAppScreen == AppScreens.SingleTicket) && SelectedView == 0 && SelectedSubView == 0) { return(MenuItemSelectorViewModel.HandleTextInput(text)); } return(false); }
public TicketEditorViewModel() { TicketListViewModel = new TicketListViewModel(); MenuItemSelectorViewModel = new MenuItemSelectorViewModel(TicketListViewModel.AddMenuItemCommand); PaymentViewModel = new PaymentEditorViewModel(); SelectedTicketItemsViewModel = new SelectedTicketItemsViewModel(); TicketExplorerViewModel = new TicketExplorerViewModel(); DisplayCategoriesScreen(); EventServiceFactory.EventService.GetEvent <GenericEvent <TicketViewModel> >().Subscribe(OnTicketViewModelEvent); EventServiceFactory.EventService.GetEvent <GenericEvent <Ticket> >().Subscribe(OnTicketEvent); EventServiceFactory.EventService.GetEvent <GenericEvent <User> >().Subscribe(OnUserLoginEvent); EventServiceFactory.EventService.GetEvent <GenericEvent <WorkPeriod> >().Subscribe(OnWorkPeriodEvent); EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe( x => { if (x.Topic == EventTopicNames.ActivateTicketView || x.Topic == EventTopicNames.DisplayTicketView) { DisplayCategoriesScreen(); } }); }
public TicketEditorViewModel() { TicketListViewModel = new TicketListViewModel(); MenuItemSelectorViewModel = new MenuItemSelectorViewModel(TicketListViewModel.AddMenuItemCommand); PaymentViewModel = new PaymentEditorViewModel(); SelectedTicketItemsViewModel = new SelectedTicketItemsViewModel(); TicketExplorerViewModel = new TicketExplorerViewModel(); DisplayCategoriesScreen(); EventServiceFactory.EventService.GetEvent<GenericEvent<TicketViewModel>>().Subscribe(OnTicketViewModelEvent); EventServiceFactory.EventService.GetEvent<GenericEvent<Ticket>>().Subscribe(OnTicketEvent); EventServiceFactory.EventService.GetEvent<GenericEvent<User>>().Subscribe(OnUserLoginEvent); EventServiceFactory.EventService.GetEvent<GenericEvent<WorkPeriod>>().Subscribe(OnWorkPeriodEvent); EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe( x => { if (x.Topic == EventTopicNames.ActivateTicketView || x.Topic == EventTopicNames.DisplayTicketView) { DisplayCategoriesScreen(); } }); }