Example #1
0
        public PosModule(IRegionManager regionManager, IApplicationState applicationState,
                         PosView posView, TicketView ticketView, TicketListView ticketListView, TicketTagListView ticketTagListView,
                         MenuItemSelectorView menuItemSelectorView, TicketEntityListView ticketEntityListView, TicketTypeListView ticketTypeListView)
            : base(regionManager, AppScreens.TicketView)
        {
            SetNavigationCommand(Resources.POS, Resources.Common, "Images/Network.png", 10);

            _posView = posView;
            _menuItemSelectorView = menuItemSelectorView;
            _ticketEntityListView = ticketEntityListView;
            _ticketTypeListView   = ticketTypeListView;
            _regionManager        = regionManager;
            _applicationState     = applicationState;
            _ticketView           = ticketView;
            _ticketListView       = ticketListView;
            _ticketTagListView    = ticketTagListView;

            EventServiceFactory.EventService.GetEvent <GenericEvent <Entity> >().Subscribe(
                x =>
            {
                if (x.Topic == EventTopicNames.PaymentRequestedForTicket)
                {
                    Activate();
                }
            });
            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(
                x =>
            {
                if (x.Topic == EventTopicNames.RefreshSelectedTicket)
                {
                    _posView.BackgroundFocus();
                }
            });
        }
Example #2
0
        public PosModule(IRegionManager regionManager, IApplicationState applicationState,
            PosView posView, TicketView ticketView, TicketListView ticketListView, TicketTagListView ticketTagListView,
            MenuItemSelectorView menuItemSelectorView, TicketEntityListView ticketEntityListView, TicketTypeListView ticketTypeListView)
            : base(regionManager, AppScreens.TicketView)
        {
            SetNavigationCommand(Resources.POS, Resources.Common, "Images/Network.png", 10);

            _posView = posView;
            _menuItemSelectorView = menuItemSelectorView;
            _ticketEntityListView = ticketEntityListView;
            _ticketTypeListView = ticketTypeListView;
            _regionManager = regionManager;
            _applicationState = applicationState;
            _ticketView = ticketView;
            _ticketListView = ticketListView;
            _ticketTagListView = ticketTagListView;

            EventServiceFactory.EventService.GetEvent<GenericEvent<Entity>>().Subscribe(
                x =>
                {
                    if (x.Topic == EventTopicNames.PaymentRequestedForTicket) Activate();
                });
            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(
                x =>
                {
                    if (x.Topic == EventTopicNames.RefreshSelectedTicket)
                    {
                        _posView.BackgroundFocus();
                    }
                });
        }