コード例 #1
0
 public bool HandleTextInput(string text)
 {
     if ((AppServices.ActiveAppScreen == AppScreens.TicketList || AppServices.ActiveAppScreen == AppScreens.SingleTicket) &&
         SelectedView == 0 && SelectedSubView == 0)
     {
         return(MenuItemSelectorViewModel.HandleTextInput(text));
     }
     return(false);
 }
コード例 #2
0
        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();
                }
            });
        }
コード例 #3
0
        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();
                     }
                 });
        }