public DepartmentSelectorView(IApplicationStateSetter applicationStateSetter, IApplicationState applicationState,
                               IUserService userService)
 {
     InitializeComponent();
     _applicationStateSetter = applicationStateSetter;
     DataContext             = new DepartmentSelectorViewModel(applicationState, _applicationStateSetter, userService);
 }
        public MenuItemSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, IMenuService menuService,
                                         ISettingService settingService, ICacheService cacheService)
        {
            _applicationState       = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _menuService            = menuService;
            _settingService         = settingService;
            _cacheService           = cacheService;

            CategoryCommand      = new DelegateCommand <ScreenMenuCategory>(OnCategoryCommandExecute);
            MenuItemCommand      = new DelegateCommand <ScreenMenuItem>(OnMenuItemCommandExecute);
            TypeValueCommand     = new DelegateCommand <string>(OnTypeValueExecute);
            FindLocationCommand  = new DelegateCommand <string>(OnFindLocationExecute, CanFindLocation);
            FindMenuItemCommand  = new DelegateCommand <string>(OnFindMenuItemCommand);
            FindTicketCommand    = new DelegateCommand <string>(OnFindTicketExecute, CanFindTicket);
            IncPageNumberCommand = new CaptionCommand <string>(Localization.Properties.Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand = new CaptionCommand <string>("<< " + Localization.Properties.Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);
            SubCategoryCommand   = new CaptionCommand <ScreenSubCategoryButton>(".", OnSubCategoryCommand);

            EventServiceFactory.EventService.GetEvent <GenericEvent <Department> >().Subscribe(OnDepartmentChanged);
            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(OnNumeratorReset);
            NumeratorValue = "";

            SubCategories = new ObservableCollection <ScreenSubCategoryButton>();
        }
예제 #3
0
        public PosViewModel(IRegionManager regionManager, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
                            ITicketService ticketService, IUserService userService, ICacheService cacheService,
                            TicketListViewModel ticketListViewModel, TicketTagListViewModel ticketTagListViewModel,
                            MenuItemSelectorViewModel menuItemSelectorViewModel, MenuItemSelectorView menuItemSelectorView, TicketViewModel ticketViewModel,
                            TicketOrdersViewModel ticketOrdersViewModel)
        {
            _ticketService             = ticketService;
            _userService               = userService;
            _cacheService              = cacheService;
            _applicationState          = applicationState;
            _applicationStateSetter    = applicationStateSetter;
            _regionManager             = regionManager;
            _menuItemSelectorView      = menuItemSelectorView;
            _ticketViewModel           = ticketViewModel;
            _ticketOrdersViewModel     = ticketOrdersViewModel;
            _menuItemSelectorViewModel = menuItemSelectorViewModel;
            _ticketListViewModel       = ticketListViewModel;
            _ticketTagListViewModel    = ticketTagListViewModel;

            EventServiceFactory.EventService.GetEvent <GenericEvent <Ticket> >().Subscribe(OnTicketEventReceived);
            EventServiceFactory.EventService.GetEvent <GenericEvent <SelectedOrdersData> >().Subscribe(OnSelectedOrdersChanged);
            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(OnTicketEvent);
            EventServiceFactory.EventService.GetEvent <GenericEvent <ScreenMenuItemData> >().Subscribe(OnMenuItemSelected);
            EventServiceFactory.EventService.GetEvent <GenericIdEvent>().Subscribe(OnTicketIdPublished);
            EventServiceFactory.EventService.GetEvent <GenericEvent <EntityOperationRequest <Resource> > >().Subscribe(OnResourceSelectedForTicket);
            EventServiceFactory.EventService.GetEvent <GenericEvent <TicketTagGroup> >().Subscribe(OnTicketTagSelected);
        }
예제 #4
0
        public PosViewModel(IRegionManager regionManager, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            ITicketService ticketService, IUserService userService, ICacheService cacheService, TicketListViewModel ticketListViewModel,
            TicketTagListViewModel ticketTagListViewModel, MenuItemSelectorViewModel menuItemSelectorViewModel, MenuItemSelectorView menuItemSelectorView,
            TicketViewModel ticketViewModel, TicketOrdersViewModel ticketOrdersViewModel,TicketEntityListViewModel ticketEntityListViewModel)
        {
            _ticketService = ticketService;
            _userService = userService;
            _cacheService = cacheService;
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _regionManager = regionManager;
            _menuItemSelectorView = menuItemSelectorView;
            _ticketViewModel = ticketViewModel;
            _ticketOrdersViewModel = ticketOrdersViewModel;
            _menuItemSelectorViewModel = menuItemSelectorViewModel;
            _ticketListViewModel = ticketListViewModel;
            _ticketTagListViewModel = ticketTagListViewModel;
            _ticketEntityListViewModel = ticketEntityListViewModel;

            EventServiceFactory.EventService.GetEvent<GenericEvent<Ticket>>().Subscribe(OnTicketEventReceived);
            EventServiceFactory.EventService.GetEvent<GenericEvent<SelectedOrdersData>>().Subscribe(OnSelectedOrdersChanged);
            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnTicketEvent);
            EventServiceFactory.EventService.GetEvent<GenericEvent<ScreenMenuItemData>>().Subscribe(OnMenuItemSelected);
            EventServiceFactory.EventService.GetEvent<GenericIdEvent>().Subscribe(OnTicketIdPublished);
            EventServiceFactory.EventService.GetEvent<GenericEvent<EntityOperationRequest<Entity>>>().Subscribe(OnEntitySelectedForTicket);
            EventServiceFactory.EventService.GetEvent<GenericEvent<TicketTagGroup>>().Subscribe(OnTicketTagSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<TicketStateData>>().Subscribe(OnTicketStateSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<Department>>().Subscribe(OnDepartmentChanged);
        }
 public DepartmentSelectorView(IApplicationStateSetter applicationStateSetter, IApplicationState applicationState,
     IUserService userService, ICacheService cacheService)
 {
     InitializeComponent();
     _applicationStateSetter = applicationStateSetter;
     DataContext = new DepartmentSelectorViewModel(applicationState, _applicationStateSetter, userService, cacheService);
 }
예제 #6
0
 public WorkPeriodService(IWorkPeriodDao workPeriodDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, ILogService logService)
 {
     _workPeriodDao          = workPeriodDao;
     _applicationState       = applicationState;
     _applicationStateSetter = applicationStateSetter;
     _logService             = logService;
 }
예제 #7
0
 public WorkPeriodService(IWorkPeriodDao workPeriodDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, ILogService logService)
 {
     _workPeriodDao = workPeriodDao;
     _applicationState = applicationState;
     _applicationStateSetter = applicationStateSetter;
     _logService = logService;
 }
        public MenuItemSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, IMenuService menuService,
            ISettingService settingService, ICacheService cacheService)
        {
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _menuService = menuService;
            _settingService = settingService;
            _cacheService = cacheService;

            CategoryCommand = new DelegateCommand<ScreenMenuCategory>(OnCategoryCommandExecute);
            MenuItemCommand = new DelegateCommand<ScreenMenuItem>(OnMenuItemCommandExecute);
            TypeValueCommand = new DelegateCommand<string>(OnTypeValueExecute);
            FindLocationCommand = new DelegateCommand<string>(OnFindLocationExecute, CanFindLocation);
            FindMenuItemCommand = new DelegateCommand<string>(OnFindMenuItemCommand);
            FindTicketCommand = new DelegateCommand<string>(OnFindTicketExecute, CanFindTicket);
            IncPageNumberCommand = new CaptionCommand<string>(Localization.Properties.Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand = new CaptionCommand<string>("<< " + Localization.Properties.Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);
            SubCategoryCommand = new CaptionCommand<ScreenSubCategoryButton>(".", OnSubCategoryCommand);

            EventServiceFactory.EventService.GetEvent<GenericEvent<Department>>().Subscribe(OnDepartmentChanged);
            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnNumeratorReset);
            NumeratorValue = "";

            SubCategories = new ObservableCollection<ScreenSubCategoryButton>();
        }
        public AccountButtonSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            ILocationService locationService, IUserService userService)
        {
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _locationService = locationService;
            _userService = userService;
            SelectLocationCategoryCommand = new DelegateCommand<AccountScreen>(OnSelectLocationCategoryExecuted);
            LocationSelectionCommand = new DelegateCommand<AccountButtonViewModel>(OnSelectLocationExecuted);
            CloseScreenCommand = new CaptionCommand<string>(Resources.Close, OnCloseScreenExecuted);
            EditSelectedLocationScreenPropertiesCommand = new CaptionCommand<string>(Resources.Properties, OnEditSelectedLocationScreenProperties, CanEditSelectedLocationScreenProperties);
            IncPageNumberCommand = new CaptionCommand<string>(Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand = new CaptionCommand<string>("<< " + Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);

            EventServiceFactory.EventService.GetEvent<GenericEvent<Department>>().Subscribe(
                x =>
                {
                    if (x.Topic == EventTopicNames.SelectAccountState)
                    {
                        RefreshLocations();
                    }
                });

            EventServiceFactory.EventService.GetEvent<GenericEvent<Message>>().Subscribe(
                x =>
                {
                    if (_applicationState.ActiveAppScreen == AppScreens.LocationList
                        && x.Topic == EventTopicNames.MessageReceivedEvent
                        && x.Value.Command == Messages.TicketRefreshMessage)
                    {
                        RefreshLocations();
                    }
                });
        }
예제 #10
0
 public GenericModemDeviceFactory(IApplicationState applicationState, ICacheService cacheService, IEntityService entityService, IApplicationStateSetter applicationStateSetter, IPrinterService printerService)
 {
     this._applicationState       = applicationState;
     this._cacheService           = cacheService;
     this._entityService          = entityService;
     this._applicationStateSetter = applicationStateSetter;
     this._printerService         = printerService;
 }
예제 #11
0
 public UserService(IUserDao userDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
     IDepartmentService departmentService)
 {
     _userDao = userDao;
     _applicationState = applicationState;
     _applicationStateSetter = applicationStateSetter;
     _departmentService = departmentService;
 }
예제 #12
0
 public void Setup()
 {
     MefBootstrapper.ComposeParts();
     WorkPeriodService = MefBootstrapper.Resolve<IWorkPeriodService>();
     InventoryService = MefBootstrapper.Resolve<IInventoryService>();
     ApplicationState = MefBootstrapper.Resolve<IApplicationState>();
     ApplicationStateSetter = MefBootstrapper.Resolve<IApplicationStateSetter>();
 }
예제 #13
0
 //
 public WorkPeriodService(IWorkPeriodDao workPeriodDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, ILogService logService, IEnumerable <IWorkPeriodProcessor> _workPeriodProcessors)
 {
     _workPeriodDao          = workPeriodDao;
     _applicationState       = applicationState;
     _applicationStateSetter = applicationStateSetter;
     _logService             = logService;
     WorkPeriodProcessors    = _workPeriodProcessors;
 }
예제 #14
0
 public UserService(IUserDao userDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
                    IDepartmentService departmentService)
 {
     _userDao                = userDao;
     _applicationState       = applicationState;
     _applicationStateSetter = applicationStateSetter;
     _departmentService      = departmentService;
 }
예제 #15
0
 protected AbstractCidDevice(string key, string name, ICacheService cacheService, IApplicationState applicationState, IEntityService entityService, IApplicationStateSetter applicationStateSettter, IPrinterService printerService) : base(name, key)
 {
     this._cacheService            = cacheService;
     this._applicationState        = applicationState;
     this._entityService           = entityService;
     this._applicationStateSettter = applicationStateSettter;
     this._printerService          = printerService;
 }
 public void Setup()
 {
     MefBootstrapper.ComposeParts();
     WorkPeriodService      = MefBootstrapper.Resolve <IWorkPeriodService>();
     InventoryService       = MefBootstrapper.Resolve <IInventoryService>();
     ApplicationState       = MefBootstrapper.Resolve <IApplicationState>();
     ApplicationStateSetter = MefBootstrapper.Resolve <IApplicationStateSetter>();
 }
예제 #17
0
 public DepartmentSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, IUserService userService)
 {
     _applicationState       = applicationState;
     _applicationStateSetter = applicationStateSetter;
     _userService            = userService;
     EventServiceFactory.EventService.GetEvent <GenericEvent <IApplicationState> >().Subscribe(OnSelectedTicketChanged);
     EventServiceFactory.EventService.GetEvent <GenericEvent <WorkPeriod> >().Subscribe(OnWorkPeriodChanged);
     EventServiceFactory.EventService.GetEvent <GenericEvent <User> >().Subscribe(OnUserLoggedIn);
 }
 public DepartmentSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, IUserService userService)
 {
     _applicationState = applicationState;
     _applicationStateSetter = applicationStateSetter;
     _userService = userService;
     EventServiceFactory.EventService.GetEvent<GenericEvent<IApplicationState>>().Subscribe(OnSelectedTicketChanged);
     EventServiceFactory.EventService.GetEvent<GenericEvent<WorkPeriod>>().Subscribe(OnWorkPeriodChanged);
     EventServiceFactory.EventService.GetEvent<GenericEvent<User>>().Subscribe(OnUserLoggedIn);
 }
예제 #19
0
        public PosViewModel(IRegionManager regionManager, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            ITicketService ticketService, IUserService userService, TicketExplorerViewModel ticketExplorerViewModel,
            MenuItemSelectorViewModel menuItemSelectorViewModel, MenuItemSelectorView menuItemSelectorView, TicketListViewModel ticketListViewModel)
        {
            _ticketService = ticketService;
            _userService = userService;
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _regionManager = regionManager;
            _menuItemSelectorView = menuItemSelectorView;
            _ticketListViewModel = ticketListViewModel;

            _menuItemSelectorViewModel = menuItemSelectorViewModel;
            _ticketExplorerViewModel = ticketExplorerViewModel;

            EventServiceFactory.EventService.GetEvent<GenericEvent<NavigationRequest>>().Subscribe(OnNavigationRequest);
            EventServiceFactory.EventService.GetEvent<GenericEvent<User>>().Subscribe(OnUserLoginEvent);
            EventServiceFactory.EventService.GetEvent<GenericEvent<WorkPeriod>>().Subscribe(OnWorkPeriodEvent);
            EventServiceFactory.EventService.GetEvent<GenericEvent<SelectedOrdersData>>().Subscribe(
                x =>
                {
                    if (x.Topic == EventTopicNames.SelectedOrdersChanged)
                    {
                        if (x.Value.SelectedOrders.Count() != 1)
                            DisplayMenuScreen();
                    }
                });

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(
                 x =>
                 {
                     switch (x.Topic)
                     {
                         case EventTopicNames.ActivatePosView:
                             DisplayTickets();
                             DisplayMenuScreen();
                             break;
                         case EventTopicNames.ActivateTicket:
                             DisplaySingleTicket();
                             break;
                         case EventTopicNames.PaymentSubmitted:
                             DisplayMenuScreen();
                             break;
                     }
                 });

            EventServiceFactory.EventService.GetEvent<GenericEvent<Department>>().Subscribe(
                x =>
                {
                    if (x.Topic == EventTopicNames.ActivateOpenTickets)
                    {
                        DisplayOpenTickets();
                    }
                });
        }
예제 #20
0
 public AccountTicketsViewModel(ITicketService ticketService, IApplicationStateSetter applicationStateSetter, IApplicationState applicationState)
 {
     _ticketService = ticketService;
     _applicationState = applicationState;
     _applicationStateSetter = applicationStateSetter;
     OpenTicketCommand = new DelegateCommand<int?>(OnOpenTicket);
     MakePaymentCommand = new CaptionCommand<string>(Resources.Settle, OnMakePayment);
     MakeFastPaymentCommand = new CaptionCommand<string>("Fast", OnMakeFastPayment);
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnClose);
     PaymentButtonGroup = new PaymentButtonGroupViewModel(MakeFastPaymentCommand, MakePaymentCommand, CloseCommand);
 }
예제 #21
0
        public EntityModule(IRegionManager regionManager, IUserService userService, IApplicationStateSetter applicationStateSetter,
                            EntitySwitcherView entitySwitcherView, EntityEditorView entityEditorView)
        {
            _entitySwitcherView     = entitySwitcherView;
            _entityEditorView       = entityEditorView;
            _regionManager          = regionManager;
            _applicationStateSetter = applicationStateSetter;

            AddDashboardCommand <EntityCollectionViewModelBase <EntityTypeViewModel, EntityType> >(Resources.EntityType.ToPlural(), Resources.Entities, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <EntityViewModel, Entity> >(Resources.Entity.ToPlural(), Resources.Entities, 40);
            AddDashboardCommand <EntityCollectionViewModelBase <EntityScreenViewModel, EntityScreen> >(Resources.EntityScreen.ToPlural(), Resources.Entities, 41);
        }
예제 #22
0
        public TicketListViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            ITicketService ticketService, IAccountService accountService, IPrinterService printerService,
            IResourceService locationService, IUserService userService, IAutomationService automationService,
            ICacheService cacheService, TicketOrdersViewModel ticketOrdersViewModel, TicketTotalsViewModel totals)
        {
            _printerService = printerService;
            _ticketService = ticketService;
            _accountService = accountService;
            _locationService = locationService;
            _userService = userService;
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _automationService = automationService;
            _cacheService = cacheService;
            _ticketOrdersViewModel = ticketOrdersViewModel;
            _totals = totals;

            _selectedOrders = new ObservableCollection<Order>();

            PrintJobCommand = new CaptionCommand<PrintJob>(Resources.Print, OnPrintJobExecute, CanExecutePrintJob);
            SelectResourceCommand = new DelegateCommand<ResourceTemplate>(OnSelectResource);

            AddMenuItemCommand = new DelegateCommand<ScreenMenuItemData>(OnAddMenuItemCommandExecute);
            CloseTicketCommand = new CaptionCommand<string>(Resources.CloseTicket_r, OnCloseTicketExecute, CanCloseTicket);
            MakePaymentCommand = new CaptionCommand<string>(Resources.Settle, OnMakePaymentExecute, CanMakePayment);
            MakeFastPaymentCommand = new CaptionCommand<PaymentTemplate>("[FastPayment]", OnMakeFastPaymentExecute, CanMakeFastPayment);
            ShowAllOpenTickets = new CaptionCommand<string>(Resources.AllTickets_r, OnShowAllOpenTickets);
            IncQuantityCommand = new CaptionCommand<string>("+", OnIncQuantityCommand, CanIncQuantity);
            DecQuantityCommand = new CaptionCommand<string>("-", OnDecQuantityCommand, CanDecQuantity);
            IncSelectionQuantityCommand = new CaptionCommand<string>("(+)", OnIncSelectionQuantityCommand, CanIncSelectionQuantity);
            DecSelectionQuantityCommand = new CaptionCommand<string>("(-)", OnDecSelectionQuantityCommand, CanDecSelectionQuantity);
            ShowTicketTagsCommand = new CaptionCommand<TicketTagGroup>(Resources.Tag, OnShowTicketsTagExecute, CanExecuteShowTicketTags);
            ShowOrderTagsCommand = new CaptionCommand<OrderTagGroup>(Resources.Tag, OnShowOrderTagsExecute, CanShowOrderTagsExecute);
            CancelItemCommand = new CaptionCommand<string>(Resources.Cancel, OnCancelItemCommand, CanCancelSelectedItems);
            MoveOrdersCommand = new CaptionCommand<string>(Resources.MoveTicketLine, OnMoveOrders, CanMoveOrders);
            EditTicketNoteCommand = new CaptionCommand<string>(Resources.TicketNote, OnEditTicketNote, CanEditTicketNote);
            RemoveTicketLockCommand = new CaptionCommand<string>(Resources.ReleaseLock, OnRemoveTicketLock, CanRemoveTicketLock);
            ChangePriceCommand = new CaptionCommand<string>(Resources.ChangePrice, OnChangePrice, CanChangePrice);

            PaymentButtonGroup = new PaymentButtonGroupViewModel(MakeFastPaymentCommand, MakePaymentCommand, CloseTicketCommand);

            EventServiceFactory.EventService.GetEvent<GenericEvent<ScreenMenuItemData>>().Subscribe(OnMenuItemSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<OrderViewModel>>().Subscribe(OnSelectedOrdersChanged);
            EventServiceFactory.EventService.GetEvent<GenericEvent<TicketTagData>>().Subscribe(OnTagSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<EntityOperationRequest<Resource>>>().Subscribe(OnAccountSelectedForTicket);
            EventServiceFactory.EventService.GetEvent<GenericEvent<EntityOperationRequest<ResourceScreenItem>>>().Subscribe(OnResourceScreenItemSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnRefreshTicket);
            EventServiceFactory.EventService.GetEvent<GenericEvent<Message>>().Subscribe(OnMessageReceived);
            EventServiceFactory.EventService.GetEvent<GenericEvent<PopupData>>().Subscribe(OnAccountSelectedFromPopup);
            EventServiceFactory.EventService.GetEvent<GenericEvent<OrderTagData>>().Subscribe(OnOrderTagEvent);
            EventServiceFactory.EventService.GetEvent<GenericEvent<MenuItemPortion>>().Subscribe(OnPortionSelected);
            EventServiceFactory.EventService.GetEvent<GenericIdEvent>().Subscribe(OnTicketIdPublished);
        }
예제 #23
0
        public UserService(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
                           IDepartmentService departmentService, IAutomationService automationService)
        {
            _applicationState       = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _departmentService      = departmentService;
            _automationService      = automationService;

            ValidatorRegistry.RegisterDeleteValidator(new UserDeleteValidator());
            ValidatorRegistry.RegisterDeleteValidator(new UserRoleDeleteValidator());
            ValidatorRegistry.RegisterSaveValidator(new UserSaveValidator());
        }
예제 #24
0
        public EntityModule(IRegionManager regionManager, IUserService userService, IApplicationStateSetter applicationStateSetter,
            EntitySwitcherView entitySwitcherView, EntityEditorView entityEditorView)
        {
            _entitySwitcherView = entitySwitcherView;
            _entityEditorView = entityEditorView;
            _regionManager = regionManager;
            _applicationStateSetter = applicationStateSetter;

            AddDashboardCommand<EntityCollectionViewModelBase<EntityTypeViewModel, EntityType>>(Resources.EntityType.ToPlural(), Resources.Entities, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<EntityViewModel, Entity>>(Resources.Entity.ToPlural(), Resources.Entities, 40);
            AddDashboardCommand<EntityCollectionViewModelBase<EntityScreenViewModel, EntityScreen>>(Resources.EntityScreen.ToPlural(), Resources.Entities, 41);
        }
예제 #25
0
        public EntitySwitcherViewModel(IRegionManager regionManager,
                                       IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, ICacheService cacheService,
                                       EntitySelectorView entitySelectorView, EntitySelectorViewModel entitySelectorViewModel,
                                       EntitySearchView entitySearchView, EntitySearchViewModel entitySearchViewModel,
                                       EntityDashboardView entityDashboardView, EntityDashboardViewModel entityDashboardViewModel, IUserService userService)
        {
            _regionManager            = regionManager;
            _applicationState         = applicationState;
            _applicationStateSetter   = applicationStateSetter;
            _cacheService             = cacheService;
            _entitySelectorView       = entitySelectorView;
            _entitySelectorViewModel  = entitySelectorViewModel;
            _entitySearchView         = entitySearchView;
            _entitySearchViewModel    = entitySearchViewModel;
            _entityDashboardView      = entityDashboardView;
            _entityDashboardViewModel = entityDashboardViewModel;
            _userService = userService;

            SelectEntityCategoryCommand = new DelegateCommand <EntityScreen>(OnSelectEntityCategoryExecuted);

            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(
                x =>
            {
                if (x.Topic == EventTopicNames.ResetCache)
                {
                    _entityScreens         = null;
                    _entitySwitcherButtons = null;
                    RaisePropertyChanged(() => EntitySwitcherButtons);
                }
            });

            EventServiceFactory.EventService.GetEvent <GenericEvent <OperationRequest <Entity> > >().Subscribe(x =>
            {
                if (x.Topic == EventTopicNames.SelectEntity)
                {
                    var ss = UpdateEntityScreens(x.Value);
                    _currentOperationRequest = x.Value;
                    ActivateEntityScreen(ss);
                    if (ss != null && ss.DisplayMode == 1)
                    {
                        _entitySearchViewModel.SearchString = x.Value.Data;
                    }
                }
            });

            this.CancelSelectionCommand = new CaptionCommand <string>("Cancel", new Action <string>(this.OnCancelSelection));
            this.RemoveSelectionCommand = new CaptionCommand <string>("Remove", new Action <string>(this.OnRemoveSelection), new Func <string, bool>(this.CanRemoveSelection));
        }
예제 #26
0
        public PosViewModel(IRegionManager regionManager, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
                            ITicketService ticketService, ITicketServiceBase ticketServiceBase, IUserService userService, ICacheService cacheService, IMessagingService messagingService,
                            TicketListViewModel ticketListViewModel, TicketTagListViewModel ticketTagListViewModel, MenuItemSelectorViewModel menuItemSelectorViewModel,
                            MenuItemSelectorView menuItemSelectorView, TicketViewModel ticketViewModel, TicketOrdersViewModel ticketOrdersViewModel,
                            TicketEntityListViewModel ticketEntityListViewModel, TicketTypeListViewModel ticketTypeListViewModel, AccountBalances accountBalances)
        {
            _ticketService             = ticketService;
            _ticketServiceBase         = ticketServiceBase;
            _userService               = userService;
            _cacheService              = cacheService;
            _messagingService          = messagingService;
            _applicationState          = applicationState;
            _applicationStateSetter    = applicationStateSetter;
            _regionManager             = regionManager;
            _menuItemSelectorView      = menuItemSelectorView;
            _ticketViewModel           = ticketViewModel;
            _ticketOrdersViewModel     = ticketOrdersViewModel;
            _menuItemSelectorViewModel = menuItemSelectorViewModel;
            _ticketListViewModel       = ticketListViewModel;
            _ticketTagListViewModel    = ticketTagListViewModel;
            _ticketEntityListViewModel = ticketEntityListViewModel;
            _ticketTypeListViewModel   = ticketTypeListViewModel;
            _accountBalances           = accountBalances;

            EventServiceFactory.EventService.GetEvent <GenericEvent <Order> >().Subscribe(OnOrderEventReceived);
            EventServiceFactory.EventService.GetEvent <GenericEvent <Ticket> >().Subscribe(OnTicketEventReceived);
            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(OnTicketEvent);
            EventServiceFactory.EventService.GetEvent <GenericEvent <ScreenMenuItemData> >().Subscribe(OnMenuItemSelected);
            EventServiceFactory.EventService.GetEvent <GenericIdEvent>().Subscribe(OnTicketIdPublished);
            EventServiceFactory.EventService.GetEvent <GenericEvent <OperationRequest <Entity> > >().Subscribe(OnEntitySelectedForTicket);
            EventServiceFactory.EventService.GetEvent <GenericEvent <TicketTagGroup> >().Subscribe(OnTicketTagSelected);
            EventServiceFactory.EventService.GetEvent <GenericEvent <TicketStateData> >().Subscribe(OnTicketStateSelected);
            EventServiceFactory.EventService.GetEvent <GenericEvent <TicketType> >().Subscribe(OnTicketTypeChanged);

            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(
                x =>
            {
                if (x.Topic == EventTopicNames.ResetCache && _applicationState.CurrentTicketType != null)
                {
                    _menuItemSelectorViewModel.Reset();
                    _menuItemSelectorViewModel.UpdateCurrentScreenMenu(_applicationState.CurrentTicketType.GetScreenMenuId(_applicationState.CurrentTerminal));
                }
            });
        }
예제 #27
0
        public PosViewModel(IRegionManager regionManager, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            ITicketService ticketService, ITicketServiceBase ticketServiceBase, IUserService userService, ICacheService cacheService, IMessagingService messagingService,
            TicketListViewModel ticketListViewModel, TicketTagListViewModel ticketTagListViewModel, MenuItemSelectorViewModel menuItemSelectorViewModel,
            MenuItemSelectorView menuItemSelectorView, TicketViewModel ticketViewModel, TicketOrdersViewModel ticketOrdersViewModel,
            TicketEntityListViewModel ticketEntityListViewModel, TicketTypeListViewModel ticketTypeListViewModel, AccountBalances accountBalances)
        {
            _ticketService = ticketService;
            _ticketServiceBase = ticketServiceBase;
            _userService = userService;
            _cacheService = cacheService;
            _messagingService = messagingService;
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _regionManager = regionManager;
            _menuItemSelectorView = menuItemSelectorView;
            _ticketViewModel = ticketViewModel;
            _ticketOrdersViewModel = ticketOrdersViewModel;
            _menuItemSelectorViewModel = menuItemSelectorViewModel;
            _ticketListViewModel = ticketListViewModel;
            _ticketTagListViewModel = ticketTagListViewModel;
            _ticketEntityListViewModel = ticketEntityListViewModel;
            _ticketTypeListViewModel = ticketTypeListViewModel;
            _accountBalances = accountBalances;

            EventServiceFactory.EventService.GetEvent<GenericEvent<Order>>().Subscribe(OnOrderEventReceived);
            EventServiceFactory.EventService.GetEvent<GenericEvent<Ticket>>().Subscribe(OnTicketEventReceived);
            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnTicketEvent);
            EventServiceFactory.EventService.GetEvent<GenericEvent<ScreenMenuItemData>>().Subscribe(OnMenuItemSelected);
            EventServiceFactory.EventService.GetEvent<GenericIdEvent>().Subscribe(OnTicketIdPublished);
            EventServiceFactory.EventService.GetEvent<GenericEvent<OperationRequest<Entity>>>().Subscribe(OnEntitySelectedForTicket);
            EventServiceFactory.EventService.GetEvent<GenericEvent<TicketTagGroup>>().Subscribe(OnTicketTagSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<TicketStateData>>().Subscribe(OnTicketStateSelected);
            EventServiceFactory.EventService.GetEvent<GenericEvent<TicketType>>().Subscribe(OnTicketTypeChanged);

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(
            x =>
            {
                if (x.Topic == EventTopicNames.ResetCache && _applicationState.CurrentTicketType != null)
                {
                    _menuItemSelectorViewModel.Reset();
                    _menuItemSelectorViewModel.UpdateCurrentScreenMenu(_applicationState.CurrentTicketType.GetScreenMenuId(_applicationState.CurrentTerminal));
                }
            });
        }
예제 #28
0
        public EntitySwitcherViewModel(IRegionManager regionManager,
            IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, ICacheService cacheService,
            EntitySelectorView entitySelectorView, EntitySelectorViewModel entitySelectorViewModel,
            EntitySearchView entitySearchView, EntitySearchViewModel entitySearchViewModel,
            EntityDashboardView entityDashboardView, EntityDashboardViewModel entityDashboardViewModel)
        {
            _regionManager = regionManager;
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _cacheService = cacheService;
            _entitySelectorView = entitySelectorView;
            _entitySelectorViewModel = entitySelectorViewModel;
            _entitySearchView = entitySearchView;
            _entitySearchViewModel = entitySearchViewModel;
            _entityDashboardView = entityDashboardView;
            _entityDashboardViewModel = entityDashboardViewModel;

            SelectEntityCategoryCommand = new DelegateCommand<EntityScreen>(OnSelectEntityCategoryExecuted);

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(
            x =>
            {
                if (x.Topic == EventTopicNames.ResetCache)
                {
                    _entityScreens = null;
                    _entitySwitcherButtons = null;
                    RaisePropertyChanged(() => EntitySwitcherButtons);
                }
            });

            EventServiceFactory.EventService.GetEvent<GenericEvent<OperationRequest<Entity>>>().Subscribe(x =>
            {
                if (x.Topic == EventTopicNames.SelectEntity)
                {
                    var ss = UpdateEntityScreens(x.Value);
                    _currentOperationRequest = x.Value;
                    ActivateEntityScreen(ss);
                    if (ss.DisplayMode == 1)
                        _entitySearchViewModel.SearchString = x.Value.Data;
                }
            });
        }
예제 #29
0
        public EntitySwitcherViewModel(IRegionManager regionManager,
                                       IApplicationState applicationState, IApplicationStateSetter applicationStateSetter, ICacheService cacheService,
                                       EntitySelectorView entitySelectorView, EntitySelectorViewModel entitySelectorViewModel,
                                       EntitySearchView entitySearchView, EntitySearchViewModel entitySearchViewModel,
                                       EntityDashboardView entityDashboardView, EntityDashboardViewModel entityDashboardViewModel)
        {
            _regionManager            = regionManager;
            _applicationState         = applicationState;
            _applicationStateSetter   = applicationStateSetter;
            _cacheService             = cacheService;
            _entitySelectorView       = entitySelectorView;
            _entitySelectorViewModel  = entitySelectorViewModel;
            _entitySearchView         = entitySearchView;
            _entitySearchViewModel    = entitySearchViewModel;
            _entityDashboardView      = entityDashboardView;
            _entityDashboardViewModel = entityDashboardViewModel;

            SelectEntityCategoryCommand = new DelegateCommand <EntityScreen>(OnSelectEntityCategoryExecuted);

            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(
                x =>
            {
                if (x.Topic == EventTopicNames.ResetCache)
                {
                    _entityScreens         = null;
                    _entitySwitcherButtons = null;
                    RaisePropertyChanged(() => EntitySwitcherButtons);
                }
            });

            EventServiceFactory.EventService.GetEvent <GenericEvent <EntityOperationRequest <Entity> > >().Subscribe(x =>
            {
                if (x.Topic == EventTopicNames.SelectEntity)
                {
                    var ss = UpdateEntityScreens(x.Value);
                    _currentOperationRequest = x.Value;
                    ActivateEntityScreen(ss);
                }
            });
        }
예제 #30
0
        public PaymentEditorViewModel(ITicketService ticketService, ICacheService cacheService, IAccountService accountService,
                                      ISettingService settingService, IAutomationService automationService, TicketTotalsViewModel totals, IApplicationStateSetter applicationStateSetter)
        {
            _ticketService          = ticketService;
            _cacheService           = cacheService;
            _accountService         = accountService;
            _settingService         = settingService;
            _automationService      = automationService;
            _applicationStateSetter = applicationStateSetter;

            _executeAutomationCommand       = new CaptionCommand <AutomationCommandData>("", OnExecuteAutomationCommand, CanExecuteAutomationCommand);
            _makePaymentCommand             = new CaptionCommand <PaymentType>("", OnMakePayment, CanMakePayment);
            _selectChangePaymentTypeCommand = new CaptionCommand <PaymentData>("", OnSelectChangePaymentType);
            _serviceSelectedCommand         = new CaptionCommand <CalculationSelector>("", OnSelectCalculationSelector, CanSelectCalculationSelector);
            _foreignCurrencySelectedCommand = new CaptionCommand <ForeignCurrency>("", OnForeignCurrencySelected);

            ClosePaymentScreenCommand = new CaptionCommand <string>(Resources.Close, OnClosePaymentScreen, CanClosePaymentScreen);

            ChangeTemplates           = new ObservableCollection <CommandButtonViewModel <PaymentData> >();
            ReturningAmountVisibility = Visibility.Collapsed;

            Totals = totals;

            PaymentButtonGroup     = new PaymentButtonGroupViewModel(_makePaymentCommand, null, ClosePaymentScreenCommand);
            ForeignCurrencyButtons = new List <CommandButtonViewModel <ForeignCurrency> >();
            NumberPadViewModel     = new NumberPadViewModel();
            NumberPadViewModel.TypedValueChanged += NumberPadViewModelTypedValueChanged;
            NumberPadViewModel.ResetValue        += NumberPadViewModelResetValue;
            NumberPadViewModel.PaymentDueChanged += NumberPadViewModelPaymentDueChanged;
            OrderSelector = new OrderSelectorViewModel(new OrderSelector(), NumberPadViewModel);

            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(x =>
            {
                if (SelectedTicket != null && x.Topic == EventTopicNames.CloseTicketRequested)
                {
                    SelectedTicket = null;
                }
            });
        }
        public ResourceSwitcherViewModel(IRegionManager regionManager, ICacheService cacheService, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            ResourceSelectorView resourceSelectorView, ResourceSelectorViewModel resourceSelectorViewModel,
            ResourceSearchView resourceSearchView, ResourceSearchViewModel resourceSearchViewModel,
            ResourceDashboardView resourceDashboardView, ResourceDashboardViewModel resourceDashboardViewModel)
        {
            _regionManager = regionManager;
            _cacheService = cacheService;
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _resourceSelectorView = resourceSelectorView;
            _resourceSelectorViewModel = resourceSelectorViewModel;
            _resourceSearchView = resourceSearchView;
            _resourceSearchViewModel = resourceSearchViewModel;
            _resourceDashboardView = resourceDashboardView;
            _resourceDashboardViewModel = resourceDashboardViewModel;

            SelectResourceCategoryCommand = new DelegateCommand<ResourceScreen>(OnSelectResourceCategoryExecuted);

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(
            x =>
            {
                if (x.Topic == EventTopicNames.ResetCache)
                {
                    _resourceScreens = null;
                    _resourceSwitcherButtons = null;
                    RaisePropertyChanged(() => ResourceSwitcherButtons);
                }
            });

            EventServiceFactory.EventService.GetEvent<GenericEvent<EntityOperationRequest<Resource>>>().Subscribe(x =>
            {
                if (x.Topic == EventTopicNames.SelectResource)
                {
                    var ss = UpdateResourceScreens(x.Value);
                    _currentOperationRequest = x.Value;
                    ActivateResourceScreen(ss);
                }
            });
        }
예제 #32
0
        public PaymentEditorViewModel(ITicketService ticketService, ICacheService cacheService, IAccountService accountService,
            ISettingService settingService, IAutomationService automationService, TicketTotalsViewModel totals, IApplicationStateSetter applicationStateSetter)
        {
            _ticketService = ticketService;
            _cacheService = cacheService;
            _accountService = accountService;
            _settingService = settingService;
            _automationService = automationService;
            _applicationStateSetter = applicationStateSetter;

            _executeAutomationCommand = new CaptionCommand<AutomationCommandData>("", OnExecuteAutomationCommand, CanExecuteAutomationCommand);
            _makePaymentCommand = new CaptionCommand<PaymentType>("", OnMakePayment, CanMakePayment);
            _selectChangePaymentTypeCommand = new CaptionCommand<PaymentData>("", OnSelectChangePaymentType);
            _serviceSelectedCommand = new CaptionCommand<CalculationSelector>("", OnSelectCalculationSelector, CanSelectCalculationSelector);
            _foreignCurrencySelectedCommand = new CaptionCommand<ForeignCurrency>("", OnForeignCurrencySelected);

            ClosePaymentScreenCommand = new CaptionCommand<string>(Resources.Close, OnClosePaymentScreen, CanClosePaymentScreen);

            ChangeTemplates = new ObservableCollection<CommandButtonViewModel<PaymentData>>();
            ReturningAmountVisibility = Visibility.Collapsed;

            Totals = totals;

            PaymentButtonGroup = new PaymentButtonGroupViewModel(_makePaymentCommand, null, ClosePaymentScreenCommand);
            ForeignCurrencyButtons = new List<CommandButtonViewModel<ForeignCurrency>>();
            NumberPadViewModel = new NumberPadViewModel();
            NumberPadViewModel.TypedValueChanged += NumberPadViewModelTypedValueChanged;
            NumberPadViewModel.ResetValue += NumberPadViewModelResetValue;
            NumberPadViewModel.PaymentDueChanged += NumberPadViewModelPaymentDueChanged;
            OrderSelector = new OrderSelectorViewModel(new OrderSelector(), NumberPadViewModel);

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(x =>
            {
                if (SelectedTicket != null && x.Topic == EventTopicNames.CloseTicketRequested)
                {
                    SelectedTicket = null;
                }
            });
        }
        public ResourceSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
                                         IResourceService resourceService, IUserService userService, ICacheService cacheService)
        {
            _applicationState       = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _resourceService        = resourceService;
            _userService            = userService;
            _cacheService           = cacheService;

            ResourceSelectionCommand = new DelegateCommand <ResourceScreenItemViewModel>(OnSelectResourceExecuted);
            IncPageNumberCommand     = new CaptionCommand <string>(Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand     = new CaptionCommand <string>("<< " + Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);

            EventServiceFactory.EventService.GetEvent <GenericEvent <Message> >().Subscribe(
                x =>
            {
                if (_applicationState.ActiveAppScreen == AppScreens.ResourceView &&
                    x.Topic == EventTopicNames.MessageReceivedEvent &&
                    x.Value.Command == Messages.TicketRefreshMessage)
                {
                    RefreshResourceScreenItems();
                }
            });
        }
        public ResourceSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            IResourceService resourceService, IUserService userService, ICacheService cacheService)
        {
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _resourceService = resourceService;
            _userService = userService;
            _cacheService = cacheService;

            ResourceSelectionCommand = new DelegateCommand<ResourceScreenItemViewModel>(OnSelectResourceExecuted);
            IncPageNumberCommand = new CaptionCommand<string>(Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand = new CaptionCommand<string>("<< " + Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);

            EventServiceFactory.EventService.GetEvent<GenericEvent<Message>>().Subscribe(
                x =>
                {
                    if (_applicationState.ActiveAppScreen == AppScreens.ResourceView
                        && x.Topic == EventTopicNames.MessageReceivedEvent
                        && x.Value.Command == Messages.TicketRefreshMessage)
                    {
                        RefreshResourceScreenItems();
                    }
                });
        }
        public MenuItemSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
                                         ISettingService settingService, ICacheService cacheService)
        {
            _applicationState       = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _settingService         = settingService;
            _cacheService           = cacheService;

            CategoryCommand       = new DelegateCommand <ScreenMenuCategory>(OnCategoryCommandExecute);
            MenuItemCommand       = new DelegateCommand <ScreenMenuItem>(OnMenuItemCommandExecute);
            TypeValueCommand      = new DelegateCommand <string>(OnTypeValueExecute);
            ClearNumeratorCommand = new DelegateCommand <string>(OnClearNumeratorCommand);
            IncPageNumberCommand  = new CaptionCommand <string>(Localization.Properties.Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand  = new CaptionCommand <string>("<< " + Localization.Properties.Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);
            SubCategoryCommand    = new CaptionCommand <ScreenSubCategoryButton>(".", OnSubCategoryCommand);
            CloseMenuViewCommand  = new CaptionCommand <string>(Localization.Properties.Resources.Close, OnCloseMenuView);

            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(OnEvent);
            NumeratorValue       = "";
            QuickNumeratorValues = new[] { "1", "2", "3", "4", "5" };

            SubCategories     = new ObservableCollection <ScreenSubCategoryButton>();
            SelectedMenuItems = new ObservableCollection <ScreenMenuItemData>();
        }
예제 #36
0
        public MenuItemSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            ISettingService settingService, ICacheService cacheService)
        {
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _settingService = settingService;
            _cacheService = cacheService;

            CategoryCommand = new DelegateCommand<ScreenMenuCategory>(OnCategoryCommandExecute);
            MenuItemCommand = new DelegateCommand<ScreenMenuItem>(OnMenuItemCommandExecute);
            TypeValueCommand = new DelegateCommand<string>(OnTypeValueExecute);
            ClearNumeratorCommand = new DelegateCommand<string>(OnClearNumeratorCommand);
            IncPageNumberCommand = new CaptionCommand<string>(Localization.Properties.Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand = new CaptionCommand<string>("<< " + Localization.Properties.Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);
            SubCategoryCommand = new CaptionCommand<ScreenSubCategoryButton>(".", OnSubCategoryCommand);
            CloseMenuViewCommand = new CaptionCommand<string>(Localization.Properties.Resources.Close, OnCloseMenuView);

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(OnEvent);
            NumeratorValue = "";
            QuickNumeratorValues = new[] { "1", "2", "3", "4", "5" };

            SubCategories = new ObservableCollection<ScreenSubCategoryButton>();
            SelectedMenuItems = new ObservableCollection<ScreenMenuItemData>();
        }
        public ResourceSelectorViewModel(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter,
            IResourceService resourceService, IUserService userService, ICacheService cacheService)
        {
            _applicationState = applicationState;
            _applicationStateSetter = applicationStateSetter;
            _resourceService = resourceService;
            _userService = userService;
            _cacheService = cacheService;
            SelectResourceCategoryCommand = new DelegateCommand<ResourceScreen>(OnSelectResourceCategoryExecuted);
            ResourceSelectionCommand = new DelegateCommand<ResourceButtonViewModel>(OnSelectResourceExecuted);
            CloseScreenCommand = new CaptionCommand<string>(Resources.Close, OnCloseScreenExecuted);
            EditSelectedResourceScreenPropertiesCommand = new CaptionCommand<string>(Resources.Properties, OnEditSelectedResourceScreenProperties, CanEditSelectedResourceScreenProperties);
            IncPageNumberCommand = new CaptionCommand<string>(Resources.NextPage + " >>", OnIncPageNumber, CanIncPageNumber);
            DecPageNumberCommand = new CaptionCommand<string>("<< " + Resources.PreviousPage, OnDecPageNumber, CanDecPageNumber);

            EventServiceFactory.EventService.GetEvent<GenericEvent<Message>>().Subscribe(
                x =>
                {
                    if (_applicationState.ActiveAppScreen == AppScreens.LocationList
                        && x.Topic == EventTopicNames.MessageReceivedEvent
                        && x.Value.Command == Messages.TicketRefreshMessage)
                    {
                        RefreshResourceScreenItems();
                    }
                });

            EventServiceFactory.EventService.GetEvent<GenericEvent<EntityOperationRequest<ResourceScreenItem>>>().Subscribe(
                x =>
                {
                    if (x.Topic == EventTopicNames.SelectLocation)
                    {
                        _currentOperationRequest = x.Value;
                        UpdateResourceScreenItems(_applicationState.SelectedResourceScreen ?? _applicationState.CurrentDepartment.LocationScreens[0]);
                    }
                });
        }
예제 #38
0
 public WorkPeriodService(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter)
 {
     _applicationState = applicationState;
     _applicationStateSetter = applicationStateSetter;
 }
예제 #39
0
 public UserService(IUserDao userDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter)
 {
     _userDao                = userDao;
     _applicationState       = applicationState;
     _applicationStateSetter = applicationStateSetter;
 }
예제 #40
0
 public SetCurrentTerminal(IApplicationStateSetter applicationStateSetter)
 {
     _applicationStateSetter = applicationStateSetter;
 }
예제 #41
0
 public WorkPeriodService(IWorkPeriodDao workPeriodDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter)
 {
     _workPeriodDao = workPeriodDao;
     _applicationState = applicationState;
     _applicationStateSetter = applicationStateSetter;
 }
예제 #42
0
 public WorkPeriodService(IWorkPeriodDao workPeriodDao, IApplicationState applicationState, IApplicationStateSetter applicationStateSetter)
 {
     _workPeriodDao          = workPeriodDao;
     _applicationState       = applicationState;
     _applicationStateSetter = applicationStateSetter;
 }
예제 #43
0
 public CometDevice(string key, string name, IApplicationState applicationState, ICacheService cacheService, IEntityService entityService, IApplicationStateSetter applicationStateSetter, IPrinterService printerService) : base(key, name, cacheService, applicationState, entityService, applicationStateSetter, printerService)
 {
 }
예제 #44
0
 protected VisibleModuleBase(IRegionManager regionManager, AppScreens appScreen)
 {
     _applicationStateSetter = ServiceLocator.Current.GetInstance <IApplicationStateSetter>();
     _regionManager          = regionManager;
     _appScreen = appScreen;
 }
예제 #45
0
 protected VisibleModuleBase(IRegionManager regionManager, AppScreens appScreen)
 {
     _applicationStateSetter = ServiceLocator.Current.GetInstance<IApplicationStateSetter>();
     _regionManager = regionManager;
     _appScreen = appScreen;
 }
예제 #46
0
 public WorkPeriodService(IApplicationState applicationState, IApplicationStateSetter applicationStateSetter)
 {
     _applicationState       = applicationState;
     _applicationStateSetter = applicationStateSetter;
 }
예제 #47
0
 public SetCurrentTerminal(IApplicationStateSetter applicationStateSetter)
 {
     _applicationStateSetter = applicationStateSetter;
 }