Exemplo n.º 1
0
 public MenuItemPropertyGroupViewModel(MenuItemPropertyGroup model)
     : base(model)
 {
     _properties           = new ObservableCollection <MenuItemPropertyViewModel>(GetProperties(model));
     AddPropertyCommand    = new CaptionCommand <string>(string.Format(Resources.Add_f, Resources.Modifier), OnAddPropertyExecuted);
     DeletePropertyCommand = new CaptionCommand <string>(string.Format(Resources.Delete_f, Resources.Modifier), OnDeletePropertyExecuted, CanDeleteProperty);
 }
 public DocumentCreatorViewModel(IAccountService accountService)
 {
     _accountService = accountService;
     SaveCommand = new CaptionCommand<string>(Resources.Save, OnSave);
     CancelCommand = new CaptionCommand<string>(Resources.Cancel, OnCancel);
     EventServiceFactory.EventService.GetEvent<GenericEvent<DocumentCreationData>>().Subscribe(OnDocumentCreation);
 }
Exemplo n.º 3
0
        public TableSelectorViewModel()
        {
            SelectTableCategoryCommand = new DelegateCommand <TableScreen>(OnSelectTableCategoryExecuted);
            TableSelectionCommand      = new DelegateCommand <TableScreenItemViewModel>(OnSelectTableExecuted);
            CloseScreenCommand         = new CaptionCommand <string>(Resources.Close, OnCloseScreenExecuted);
            EditSelectedTableScreenPropertiesCommand = new CaptionCommand <string>(Resources.Properties, OnEditSelectedTableScreenProperties, CanEditSelectedTableScreenProperties);
            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.SelectTable)
                {
                    RefreshTables();
                }
            });

            EventServiceFactory.EventService.GetEvent <GenericEvent <Message> >().Subscribe(
                x =>
            {
                if (AppServices.ActiveAppScreen == AppScreens.TableList &&
                    x.Topic == EventTopicNames.MessageReceivedEvent &&
                    x.Value.Command == Messages.TicketRefreshMessage)
                {
                    RefreshTables();
                }
            });
        }
Exemplo n.º 4
0
        public PaymentEditorViewModel()
        {
            _manualPrintCommand = new CaptionCommand<PrintJob>(Resources.Print, OnManualPrint, CanManualPrint);
            SubmitCashPaymentCommand = new CaptionCommand<string>(Resources.Cash, OnSubmitCashPayment, CanSubmitCashPayment);
            SubmitCreditCardPaymentCommand = new CaptionCommand<string>(Resources.CreditCard_r, OnSubmitCreditCardPayment,
                                                                        CanSubmitCashPayment);
            SubmitTicketPaymentCommand = new CaptionCommand<string>(Resources.Voucher_r, OnSubmitTicketPayment, CanSubmitCashPayment);
            SubmitAccountPaymentCommand = new CaptionCommand<string>(Resources.AccountBalance_r, OnSubmitAccountPayment, CanSubmitAccountPayment);
            ClosePaymentScreenCommand = new CaptionCommand<string>(Resources.Close, OnClosePaymentScreen, CanClosePaymentScreen);
            TenderAllCommand = new CaptionCommand<string>(Resources.All, OnTenderAllCommand);
            TypeValueCommand = new DelegateCommand<string>(OnTypeValueExecuted);
            SetValueCommand = new DelegateCommand<string>(OnSetValue);
            DivideValueCommand = new DelegateCommand<string>(OnDivideValue);
            SelectMergedItemCommand = new DelegateCommand<MergedItem>(OnMergedItemSelected);

            SetDiscountAmountCommand = new CaptionCommand<string>(Resources.Round, OnSetDiscountAmountCommand, CanSetDiscount);
            AutoSetDiscountAmountCommand = new CaptionCommand<string>(Resources.Flat, OnAutoSetDiscount, CanAutoSetDiscount);
            SetDiscountRateCommand = new CaptionCommand<string>(Resources.DiscountPercentSign, OnSetDiscountRateCommand, CanSetDiscountRate);

            MergedItems = new ObservableCollection<MergedItem>();
            ReturningAmountVisibility = Visibility.Collapsed;

            LastTenderedAmount = "1";
            EventServiceFactory.EventService.GetEvent<GenericEvent<CreditCardProcessingResult>>().Subscribe(OnProcessCreditCard);
        }
Exemplo n.º 5
0
 public PrintJobViewModel(PrintJob model)
     : base(model)
 {
     _newPrinterMaps         = new List <PrinterMap>();
     AddPrinterMapCommand    = new CaptionCommand <string>(Resources.Add, OnAddPrinterMap);
     DeletePrinterMapCommand = new CaptionCommand <string>(Resources.Delete, OnDelete, CanDelete);
 }
Exemplo n.º 6
0
 public TaskViewModel(Task model, IDiagram widget, IMessagingService messagingService)
 {
     _widget                = widget;
     _messagingService      = messagingService;
     Model                  = model;
     ToggleCompletedCommand = new CaptionCommand <string>("¨", OnToggleCompleted);
 }
Exemplo n.º 7
0
 public TransactionViewModel(IApplicationState applicationState, IInventoryService inventoryService)
 {
     _applicationState            = applicationState;
     _inventoryService            = inventoryService;
     AddTransactionItemCommand    = new CaptionCommand <string>(string.Format(Resources.Add_f, Resources.Line), OnAddTransactionItem, CanAddTransactionItem);
     DeleteTransactionItemCommand = new CaptionCommand <string>(string.Format(Resources.Delete_f, Resources.Line), OnDeleteTransactionItem, CanDeleteTransactionItem);
 }
Exemplo n.º 8
0
 public TaskViewModel(Task model, IDiagram widget, IMessagingService messagingService)
 {
     _widget = widget;
     _messagingService = messagingService;
     Model = model;
     ToggleCompletedCommand = new CaptionCommand<string>("¨", OnToggleCompleted);
 }
 public AutomationButtonWidgetViewModel(Widget widget, IApplicationState applicationState, IAutomationDao automationDao)
     : base(widget, applicationState)
 {
     _applicationState  = applicationState;
     _automationDao     = automationDao;
     ItemClickedCommand = new CaptionCommand <AutomationButtonWidgetViewModel>("", OnItemClicked);
 }
        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();
                    }
                });
        }
 public OrderStateEditorViewModel()
 {
     CloseCommand = new CaptionCommand <string>(Resources.Close, OnCloseCommandExecuted);
     OrderStateSelectedCommand = new DelegateCommand <OrderStateButtonViewModel>(OnOrderStateSelected);
     OrderStates = new ObservableCollection <OrderStateButtonViewModel>();
     EventServiceFactory.EventService.GetEvent <GenericEvent <OrderStateData> >().Subscribe(OnOrderStateDataSelected);
 }
 public WarehouseInventoryViewModel(IInventoryService inventoryService, ICacheService cacheService, IApplicationState applicationState)
 {
     _inventoryService = inventoryService;
     _cacheService = cacheService;
     _applicationState = applicationState;
     WarehouseButtonSelectedCommand = new CaptionCommand<Warehouse>("", OnWarehouseSelected);
 }
Exemplo n.º 13
0
        public TicketEditorViewModel()
        {
            AddMenuItemsCommand = new CaptionCommand<string>(Resources.Add, OnAddMenuItems, CanAddMenuItems);
            DeleteSelectedItemsCommand = new CaptionCommand<string>(Resources.Delete_ab, OnDeleteSelectedItems, CanDeleteSelectedItems);
            ChangeTableCommand = new CaptionCommand<string>(Resources.Table, OnChangeTable, CanChangeTable);
            IncSelectedQuantityCommand = new CaptionCommand<string>("+", OnIncSelectedQuantity, CanIncSelectedQuantity);
            DecSelectedQuantityCommand = new CaptionCommand<string>("-", OnDecSelectedQuantity, CanDecSelectedQuantity);
            MoveSelectedItemsCommand = new CaptionCommand<string>(Resources.Divide_ab, OnMoveSelectedItems, CanMoveSelectedItems);
            EditTicketNoteCommand = new CaptionCommand<string>(Resources.Note, OnEditTicketNote);
            PrintJobCommand = new CaptionCommand<PrintJob>(Resources.Print_ab, OnPrintJobExecute, CanExecutePrintJob);
            TicketTagCommand = new CaptionCommand<TicketTagGroup>("Tag", OnTicketTagExecute, CanTicketTagExecute);

            EventServiceFactory.EventService.GetEvent<GenericEvent<TicketItemViewModel>>().Subscribe(
                x =>
                {
                    if (SelectedTicket != null && x.Topic == EventTopicNames.SelectedItemsChanged)
                    {
                        LastSelectedTicketItem = x.Value.Selected ? x.Value : null;
                        foreach (var item in SelectedTicket.SelectedItems)
                        { item.IsLastSelected = item == LastSelectedTicketItem; }
                    }
                });

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(
             x =>
             {
                 if (x.Topic == EventTopicNames.RefreshSelectedTicket)
                 {
                     DataContext.RefreshSelectedTicket();
                     Refresh();
                 }
             });
        }
 public OrderStateEditorViewModel()
 {
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnCloseCommandExecuted);
     OrderStateSelectedCommand = new DelegateCommand<OrderStateButtonViewModel>(OnOrderStateSelected);
     OrderStates = new ObservableCollection<OrderStateButtonViewModel>();
     EventServiceFactory.EventService.GetEvent<GenericEvent<OrderStateData>>().Subscribe(OnOrderStateDataSelected);
 }
Exemplo n.º 15
0
        public AccountSelectorViewModel(IAccountService accountService, ICacheService cacheService, IApplicationState applicationState, IEntityService entityService,
            IReportServiceClient reportServiceClient)
        {
            _accounts = new ObservableCollection<AccountScreenRow>();
            _accountService = accountService;
            _cacheService = cacheService;
            _applicationState = applicationState;
            _entityService = entityService;
            _reportServiceClient = reportServiceClient;
            ShowAccountDetailsCommand = new CaptionCommand<string>(Resources.AccountDetails.Replace(' ', '\r'), OnShowAccountDetails, CanShowAccountDetails);
            PrintCommand = new CaptionCommand<string>(Resources.Print, OnPrint);
            AccountButtonSelectedCommand = new CaptionCommand<AccountScreen>("", OnAccountScreenSelected);
            AutomationCommandSelectedCommand = new CaptionCommand<AccountScreenAutmationCommandMap>("", OnAutomationCommandSelected);

            EventServiceFactory.EventService.GetEvent<GenericEvent<EventAggregator>>().Subscribe(
            x =>
            {
                if (x.Topic == EventTopicNames.ResetCache)
                {
                    _accountButtons = null;
                    _batchDocumentButtons = null;
                    _selectedAccountScreen = null;
                }
            });
        }
Exemplo n.º 16
0
 public TicketEntityListViewModel(ICacheService cacheService)
 {
     _cacheService    = cacheService;
     SelectionCommand = new DelegateCommand <Entity>(OnSelectEntity);
     CloseCommand     = new CaptionCommand <string>(Resources.Close, OnClose);
     EntityList       = new ObservableCollection <Entity>();
 }
 public BatchDocumentCreatorViewModel(IAccountService accountService, ICacheService cacheService)
 {
     Accounts        = new ObservableCollection <AccountRowViewModel>();
     _accountService = accountService;
     _cacheService   = cacheService;
     CreateDocuments = new CaptionCommand <string>(string.Format(Resources.Create_f, "").Trim(), OnCreateDocuments, CanCreateDocument);
 }
Exemplo n.º 18
0
        public TicketViewModel(Ticket model, TicketTemplate ticketTemplate, bool forcePayment,
            ITicketService ticketService, IAutomationService automationService,
            IApplicationState applicationState)
        {
            _ticketService = ticketService;
            _forcePayment = forcePayment;
            _model = model;
            _ticketTemplate = ticketTemplate;
            _automationService = automationService;
            _applicationState = applicationState;

            _orders = new ObservableCollection<OrderViewModel>(model.Orders.Select(x => new OrderViewModel(x, ticketTemplate, _automationService)).OrderBy(x => x.Model.CreatedDateTime));
            _itemsViewSource = new CollectionViewSource { Source = _orders };
            _itemsViewSource.GroupDescriptions.Add(new PropertyGroupDescription("GroupObject"));

            SelectAllItemsCommand = new CaptionCommand<string>("", OnSelectAllItemsExecute);

            PrintJobButtons = _applicationState.CurrentTerminal.PrintJobs
                .Where(x => (!string.IsNullOrEmpty(x.ButtonHeader))
                    && (x.PrinterMaps.Count(y => y.DepartmentId == 0 || y.DepartmentId == model.DepartmentId) > 0))
                .OrderBy(x => x.Order)
                .Select(x => new PrintJobButton(x, Model));

            if (PrintJobButtons.Count(x => x.Model.UseForPaidTickets) > 0)
            {
                PrintJobButtons = IsPaid
                    ? PrintJobButtons.Where(x => x.Model.UseForPaidTickets)
                    : PrintJobButtons.Where(x => !x.Model.UseForPaidTickets);
            }
        }
 public AutomationCommandValueSelectorViewModel()
 {
     CloseCommand = new CaptionCommand <string>(Resources.Close, OnCloseCommandExecuted);
     AutomationCommandSelectedCommand = new DelegateCommand <string>(OnAutomationCommandValueSelected);
     CommandValues = new ObservableCollection <string>();
     EventServiceFactory.EventService.GetEvent <GenericEvent <AutomationCommand> >().Subscribe(OnAutomationCommandEvent);
 }
Exemplo n.º 20
0
        public EntityCollectionViewModelBase()
        {
            Limit                   = LocalSettings.DefaultRecordLimit;
            OpenViewModels          = new List <EntityViewModelBase <TModel> >();
            BatchCreateItemsCommand = new CaptionCommand <TModel>(string.Format(Resources.BatchCreate_f, PluralModelTitle), OnBatchCreateItems, CanBatchCreateItems);
            SortItemsCommand        = new CaptionCommand <TModel>(string.Format(Resources.Sort_f, PluralModelTitle), OnSortItems);
            RemoveLimitCommand      = new CaptionCommand <TModel>(Resources.RemoveLimit, OnRemoveLimit);
            ToggleOrderByIdCommand  = new CaptionCommand <TModel>(Resources.ChangeSortOrder, OnToggleOrderById);

            if (typeof(TViewModel).GetInterfaces().Any(x => x == typeof(IEntityCreator <TModel>)))
            {
                CustomCommands.Add(BatchCreateItemsCommand);
            }

            CustomCommands.Add(typeof(TModel).GetInterfaces().Any(x => x == typeof(IOrderable))
                                   ? SortItemsCommand
                                   : ToggleOrderByIdCommand);

            _token = EventServiceFactory.EventService.GetEvent <GenericEvent <EntityViewModelBase <TModel> > >().Subscribe(x =>
            {
                if (x.Topic == EventTopicNames.AddedModelSaved)
                {
                    if (x.Value is TViewModel)
                    {
                        Items.Add(x.Value as TViewModel);
                    }
                }

                if (x.Topic == EventTopicNames.ModelAddedOrDeleted)
                {
                    foreach (var openViewModel in OpenViewModels)
                    {
                        if (!openViewModel.CanSave())
                        {
                            openViewModel.RollbackModel();
                        }
                    }

                    if (x.Value is TViewModel)
                    {
                        Dao.RemoveFromCache(x.Value.Model as ICacheable);
                        _workspace.Update(x.Value.Model);
                        _workspace.CommitChanges();
                        _workspace.Refresh(x.Value.Model);
                    }
                }
            });

            _token2 = EventServiceFactory.EventService.GetEvent <GenericEvent <VisibleViewModelBase> >().Subscribe(
                s =>
            {
                if (s.Topic == EventTopicNames.ViewClosed)
                {
                    if (s.Value is EntityViewModelBase <TModel> && OpenViewModels.Contains(s.Value))
                    {
                        OpenViewModels.Remove(s.Value as EntityViewModelBase <TModel>);
                    }
                }
            });
        }
        public PaymentEditorViewModel(IApplicationState applicationState,
                                      TicketTotalsViewModel paymentTotals, PaymentEditor paymentEditor, NumberPadViewModel numberPadViewModel,
                                      OrderSelectorViewModel orderSelectorViewModel, ITicketService ticketService,
                                      ForeignCurrencyButtonsViewModel foreignCurrencyButtonsViewModel, PaymentButtonsViewModel paymentButtonsViewModel,
                                      CommandButtonsViewModel commandButtonsViewModel, TenderedValueViewModel tenderedValueViewModel,
                                      ReturningAmountViewModel returningAmountViewModel, ChangeTemplatesViewModel changeTemplatesViewModel, AccountBalances accountBalances)
        {
            _applicationState                = applicationState;
            _paymentTotals                   = paymentTotals;
            _paymentEditor                   = paymentEditor;
            _numberPadViewModel              = numberPadViewModel;
            _orderSelectorViewModel          = orderSelectorViewModel;
            _ticketService                   = ticketService;
            _foreignCurrencyButtonsViewModel = foreignCurrencyButtonsViewModel;
            _commandButtonsViewModel         = commandButtonsViewModel;
            _tenderedValueViewModel          = tenderedValueViewModel;
            _returningAmountViewModel        = returningAmountViewModel;
            _changeTemplatesViewModel        = changeTemplatesViewModel;
            _accountBalances                 = accountBalances;

            _makePaymentCommand             = new CaptionCommand <PaymentType>("", OnMakePayment, CanMakePayment);
            _selectChangePaymentTypeCommand = new CaptionCommand <PaymentData>("", OnSelectChangePaymentType);

            ClosePaymentScreenCommand = new CaptionCommand <string>(Resources.Close, OnClosePaymentScreen, CanClosePaymentScreen);
            paymentButtonsViewModel.SetButtonCommands(_makePaymentCommand, null, ClosePaymentScreenCommand);
        }
Exemplo n.º 22
0
 public PrinterTemplateViewModel(IPrinterService printerService)
 {
     _printerService                 = printerService;
     LoadTicketTemplateCommand       = new CaptionCommand <string>("", OnLoadTicketTemplate);
     LoadKitchenOrderTemplateCommand = new CaptionCommand <string>("", OnLoadKitchenOrderTemplate);
     LoadCustomerReceiptCommand      = new CaptionCommand <string>("", OnLoadCustomerReceiptTemplate);
 }
Exemplo n.º 23
0
 public RuleViewModel(IAutomationService automationService, IAutomationDao automationDao)
 {
     _automationService   = automationService;
     _automationDao       = automationDao;
     SelectActionsCommand = new CaptionCommand <string>(Resources.SelectActions, OnSelectActions);
     Constraints          = new ObservableCollection <RuleConstraint>();
 }
 public TicketEntityListViewModel(ICacheService cacheService)
 {
     _cacheService = cacheService;
     SelectionCommand = new DelegateCommand<Entity>(OnSelectEntity);
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnClose);
     EntityList = new ObservableCollection<Entity>();
 }
Exemplo n.º 25
0
 public TicketTagListViewModel(ICacheService cacheService)
 {
     _cacheService = cacheService;
     SelectionCommand = new DelegateCommand<TicketTagGroup>(OnSelectTicketTagGroup);
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnClose);
     TicketTagValueViewModels = new ObservableCollection<TicketTagValueViewModel>();
 }
 public AutomationButtonWidgetViewModel(Widget widget, IApplicationState applicationState, IAutomationDao automationDao)
     : base(widget, applicationState)
 {
     _applicationState = applicationState;
     _automationDao = automationDao;
     ItemClickedCommand = new CaptionCommand<AutomationButtonWidgetViewModel>("", OnItemClicked);
 }
Exemplo n.º 27
0
 public PopupDataViewModel(IApplicationState applicationState)
 {
     _applicationState = applicationState;
     _popupCache = new List<PopupData>();
     _popupList = new ObservableCollection<PopupData>();
     ClickButtonCommand = new CaptionCommand<PopupData>("Click", OnButtonClick);
 }
Exemplo n.º 28
0
 public TicketTagListViewModel(IApplicationState applicationState)
 {
     _applicationState        = applicationState;
     SelectionCommand         = new DelegateCommand <TicketTagGroup>(OnSelectTicketTagGroup);
     CloseCommand             = new CaptionCommand <string>(Resources.Close, OnClose);
     TicketTagValueViewModels = new ObservableCollection <TicketTagValueViewModel>();
 }
Exemplo n.º 29
0
        public PaymentEditorViewModel()
        {
            _manualPrintCommand            = new CaptionCommand <PrintJob>(Resources.Print, OnManualPrint, CanManualPrint);
            SubmitCashPaymentCommand       = new CaptionCommand <string>(Resources.Cash, OnSubmitCashPayment, CanSubmitCashPayment);
            SubmitCreditCardPaymentCommand = new CaptionCommand <string>(Resources.CreditCard_r, OnSubmitCreditCardPayment,
                                                                         CanSubmitCashPayment);
            SubmitTicketPaymentCommand  = new CaptionCommand <string>(Resources.Voucher_r, OnSubmitTicketPayment, CanSubmitCashPayment);
            SubmitAccountPaymentCommand = new CaptionCommand <string>(Resources.AccountBalance_r, OnSubmitAccountPayment, CanSubmitAccountPayment);
            ClosePaymentScreenCommand   = new CaptionCommand <string>(Resources.Close, OnClosePaymentScreen, CanClosePaymentScreen);
            TenderAllCommand            = new CaptionCommand <string>(Resources.All, OnTenderAllCommand);
            TypeValueCommand            = new DelegateCommand <string>(OnTypeValueExecuted);
            SetValueCommand             = new DelegateCommand <string>(OnSetValue);
            DivideValueCommand          = new DelegateCommand <string>(OnDivideValue);
            SelectMergedItemCommand     = new DelegateCommand <MergedItem>(OnMergedItemSelected);

            SetDiscountAmountCommand     = new CaptionCommand <string>(Resources.Round, OnSetDiscountAmountCommand, CanSetDiscount);
            AutoSetDiscountAmountCommand = new CaptionCommand <string>(Resources.Flat, OnAutoSetDiscount, CanAutoSetDiscount);
            SetDiscountRateCommand       = new CaptionCommand <string>(Resources.DiscountPercentSign, OnSetDiscountRateCommand, CanSetDiscountRate);

            MergedItems = new ObservableCollection <MergedItem>();
            ReturningAmountVisibility = Visibility.Collapsed;

            LastTenderedAmount = "1";
            EventServiceFactory.EventService.GetEvent <GenericEvent <CreditCardProcessingResult> >().Subscribe(OnProcessCreditCard);
        }
Exemplo n.º 30
0
 public TicketTagGroupViewModel(TicketTagGroup model)
     : base(model)
 {
     _ticketTags            = new ObservableCollection <TicketTagViewModel>(GetTicketTags(model));
     AddTicketTagCommand    = new CaptionCommand <string>(string.Format(Resources.Add_f, Resources.Tag), OnAddTicketTagExecuted);
     DeleteTicketTagCommand = new CaptionCommand <string>(string.Format(Resources.Delete_f, Resources.Tag), OnDeleteTicketTagExecuted, CanDeleteTicketTag);
 }
 public AutomationCommandValueSelectorViewModel()
 {
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnCloseCommandExecuted);
     AutomationCommandSelectedCommand = new DelegateCommand<string>(OnAutomationCommandValueSelected);
     CommandValues = new ObservableCollection<string>();
     EventServiceFactory.EventService.GetEvent<GenericEvent<AutomationCommand>>().Subscribe(OnAutomationCommandEvent);
 }
        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>();
        }
Exemplo n.º 33
0
        public PaymentEditorViewModel(IApplicationState applicationState, ICacheService cacheService, IExpressionService expressionService,
            TicketTotalsViewModel paymentTotals, PaymentEditor paymentEditor, NumberPadViewModel numberPadViewModel,
            OrderSelectorViewModel orderSelectorViewModel, ITicketService ticketService,
            ForeignCurrencyButtonsViewModel foreignCurrencyButtonsViewModel, PaymentButtonsViewModel paymentButtonsViewModel,
            CommandButtonsViewModel commandButtonsViewModel, TenderedValueViewModel tenderedValueViewModel,
            ReturningAmountViewModel returningAmountViewModel, ChangeTemplatesViewModel changeTemplatesViewModel, AccountBalances accountBalances)
        {
            _applicationState = applicationState;
            _cacheService = cacheService;
            _expressionService = expressionService;
            _paymentTotals = paymentTotals;
            _paymentEditor = paymentEditor;
            _numberPadViewModel = numberPadViewModel;
            _orderSelectorViewModel = orderSelectorViewModel;
            _ticketService = ticketService;
            _foreignCurrencyButtonsViewModel = foreignCurrencyButtonsViewModel;
            _commandButtonsViewModel = commandButtonsViewModel;
            _tenderedValueViewModel = tenderedValueViewModel;
            _returningAmountViewModel = returningAmountViewModel;
            _changeTemplatesViewModel = changeTemplatesViewModel;
            _accountBalances = accountBalances;

            _makePaymentCommand = new CaptionCommand<PaymentType>("", OnMakePayment, CanMakePayment);
            _selectChangePaymentTypeCommand = new CaptionCommand<PaymentData>("", OnSelectChangePaymentType);

            ClosePaymentScreenCommand = new CaptionCommand<string>(Resources.Close, OnClosePaymentScreen, CanClosePaymentScreen);
            paymentButtonsViewModel.SetButtonCommands(_makePaymentCommand, null, ClosePaymentScreenCommand);
        }
Exemplo n.º 34
0
        public TicketEditorViewModel()
        {
            AddMenuItemsCommand        = new CaptionCommand <string>(Resources.Add, OnAddMenuItems, CanAddMenuItems);
            DeleteSelectedItemsCommand = new CaptionCommand <string>(Resources.Delete_ab, OnDeleteSelectedItems, CanDeleteSelectedItems);
            ChangeTableCommand         = new CaptionCommand <string>(Resources.Table, OnChangeTable, CanChangeTable);
            IncSelectedQuantityCommand = new CaptionCommand <string>("+", OnIncSelectedQuantity, CanIncSelectedQuantity);
            DecSelectedQuantityCommand = new CaptionCommand <string>("-", OnDecSelectedQuantity, CanDecSelectedQuantity);
            MoveSelectedItemsCommand   = new CaptionCommand <string>(Resources.Divide_ab, OnMoveSelectedItems, CanMoveSelectedItems);
            EditTicketNoteCommand      = new CaptionCommand <string>(Resources.Note, OnEditTicketNote);
            PrintJobCommand            = new CaptionCommand <PrintJob>(Resources.Print_ab, OnPrintJobExecute, CanExecutePrintJob);
            TicketTagCommand           = new CaptionCommand <TicketTagGroup>("Tag", OnTicketTagExecute, CanTicketTagExecute);

            EventServiceFactory.EventService.GetEvent <GenericEvent <TicketItemViewModel> >().Subscribe(
                x =>
            {
                if (SelectedTicket != null && x.Topic == EventTopicNames.SelectedItemsChanged)
                {
                    LastSelectedTicketItem = x.Value.Selected ? x.Value : null;
                    foreach (var item in SelectedTicket.SelectedItems)
                    {
                        item.IsLastSelected = item == LastSelectedTicketItem;
                    }
                }
            });

            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(
                x =>
            {
                if (x.Topic == EventTopicNames.RefreshSelectedTicket)
                {
                    DataContext.RefreshSelectedTicket();
                    Refresh();
                }
            });
        }
Exemplo n.º 35
0
        public PaymentEditorViewModel(IApplicationState applicationState, ITicketService ticketService,
            IPrinterService printerService, IUserService userService, IAutomationService automationService, TicketTotalsViewModel totals)
        {
            _applicationState = applicationState;
            _ticketService = ticketService;
            _printerService = printerService;
            _userService = userService;
            _automationService = automationService;

            _manualPrintCommand = new CaptionCommand<PrintJob>(Resources.Print, OnManualPrint, CanManualPrint);
            _makePaymentCommand = new CaptionCommand<PaymentTemplate>("", OnMakePayment, CanMakePayment);
            _serviceSelectedCommand = new CaptionCommand<CalculationTemplate>("", OnSelectCalculationTemplate);

            SubmitAccountPaymentCommand = new CaptionCommand<string>(Resources.AccountBalance_r, OnSubmitAccountPayment, CanSubmitAccountPayment);
            ClosePaymentScreenCommand = new CaptionCommand<string>(Resources.Close, OnClosePaymentScreen, CanClosePaymentScreen);
            TenderAllCommand = new CaptionCommand<string>(Resources.All, OnTenderAllCommand);
            TypeValueCommand = new DelegateCommand<string>(OnTypeValueExecuted);
            SetValueCommand = new DelegateCommand<string>(OnSetValue);
            DivideValueCommand = new DelegateCommand<string>(OnDivideValue);
            SelectMergedItemCommand = new DelegateCommand<MergedItem>(OnMergedItemSelected);

            SetDiscountAmountCommand = new CaptionCommand<string>(Resources.Round, OnSetDiscountAmountCommand, CanSetDiscount);
            AutoSetDiscountAmountCommand = new CaptionCommand<string>(Resources.Flat, OnAutoSetDiscount, CanAutoSetDiscount);
            SetDiscountRateCommand = new CaptionCommand<string>(Resources.DiscountPercentSign, OnSetDiscountRateCommand, CanSetDiscountRate);

            MergedItems = new ObservableCollection<MergedItem>();
            ReturningAmountVisibility = Visibility.Collapsed;

            Totals = totals;

            PaymentButtonGroup = new PaymentButtonGroupViewModel(_makePaymentCommand, null, ClosePaymentScreenCommand);

            LastTenderedAmount = "1";
        }
Exemplo n.º 36
0
 public TicketTagListViewModel(IApplicationState applicationState)
 {
     _applicationState = applicationState;
     SelectionCommand = new DelegateCommand<TicketTagGroup>(OnSelectTicketTagGroup);
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnClose);
     TicketTagValueViewModels = new ObservableCollection<TicketTagValueViewModel>();
 }
 public DepartmentButtonViewModel(DepartmentSelectorViewModel parentViewModel,
     IApplicationState applicationState)
 {
     _parentViewModel = parentViewModel;
     _applicationState = applicationState;
     DepartmentSelectionCommand = new CaptionCommand<string>("Select", OnSelectDepartment);
 }
 public DepartmentButtonViewModel(DepartmentSelectorViewModel parentViewModel,
                                  IApplicationState applicationState)
 {
     _parentViewModel           = parentViewModel;
     _applicationState          = applicationState;
     DepartmentSelectionCommand = new CaptionCommand <string>("Select", OnSelectDepartment);
 }
Exemplo n.º 39
0
 public PrinterViewModel(IPrinterService printerService, IUserInteraction userInteraction)
 {
     _printerService  = printerService;
     _userInteraction = userInteraction;
     EditCustomPrinterSettingsCommand = new CaptionCommand <string>(Resources.Settings,
                                                                    OnEditCustomPrinterSettings, CanEditCustomPrinterSettings);
 }
Exemplo n.º 40
0
 public TicketTagListViewModel(ICacheService cacheService)
 {
     _cacheService            = cacheService;
     SelectionCommand         = new DelegateCommand <TicketTagGroup>(OnSelectTicketTagGroup);
     CloseCommand             = new CaptionCommand <string>(Resources.Close, OnClose);
     TicketTagValueViewModels = new ObservableCollection <TicketTagValueViewModel>();
 }
Exemplo n.º 41
0
 public OrderTagGroupViewModel(IMenuService menuService)
 {
     _menuService          = menuService;
     AddOrderTagCommand    = new CaptionCommand <string>(string.Format(Resources.Add_f, Resources.OrderTag), OnAddPropertyExecuted);
     DeleteOrderTagCommand = new CaptionCommand <string>(string.Format(Resources.Delete_f, Resources.OrderTag), OnDeletePropertyExecuted, CanDeleteProperty);
     SortOrderTagsCommand  = new CaptionCommand <string>(string.Format(Resources.Sort_f, Resources.OrderTag), OnSortPropertyExecuted);
 }
        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>();
        }
Exemplo n.º 43
0
        public RuleViewModel(AppRule model)
            : base(model)
        {
            _actions = new ObservableCollection <ActionContainerViewModel>(Model.Actions.Select(x => new ActionContainerViewModel(x, this)));

            SelectActionsCommand = new CaptionCommand <string>(Resources.SelectActions, OnSelectActions);
            Constraints          = new ObservableCollection <RuleConstraintViewModel>();
            if (!string.IsNullOrEmpty(model.EventConstraints))
            {
                Constraints.AddRange(
                    model.EventConstraints.Split('#')
                    .Where(x => !x.StartsWith("SN$"))
                    .Select(x => new RuleConstraintViewModel(x)));
                var settingData =
                    model.EventConstraints.Split('#').Where(x => x.StartsWith("SN$")).FirstOrDefault();
                if (!string.IsNullOrEmpty(settingData))
                {
                    var settingParts = settingData.Split(';');
                    if (settingParts.Length == 3)
                    {
                        SettingConstraintName      = settingParts[0].Replace("SN$", "");
                        SettingConstraintOperation = settingParts[1];
                        SettingConstraintValue     = settingParts[2];
                    }
                }
            }
        }
Exemplo n.º 44
0
        public AccountSelectorViewModel(IAccountService accountService, ICacheService cacheService, IApplicationState applicationState, IEntityService entityService,
                                        IReportServiceClient reportServiceClient)
        {
            _accounts                        = new ObservableCollection <AccountScreenRow>();
            _accountService                  = accountService;
            _cacheService                    = cacheService;
            _applicationState                = applicationState;
            _entityService                   = entityService;
            _reportServiceClient             = reportServiceClient;
            ShowAccountDetailsCommand        = new CaptionCommand <string>(Resources.AccountDetails.Replace(' ', '\r'), OnShowAccountDetails, CanShowAccountDetails);
            PrintCommand                     = new CaptionCommand <string>(Resources.Print, OnPrint);
            AccountButtonSelectedCommand     = new CaptionCommand <AccountScreen>("", OnAccountScreenSelected);
            AutomationCommandSelectedCommand = new CaptionCommand <AccountScreenAutmationCommandMap>("", OnAutomationCommandSelected);

            EventServiceFactory.EventService.GetEvent <GenericEvent <EventAggregator> >().Subscribe(
                x =>
            {
                if (x.Topic == EventTopicNames.ResetCache)
                {
                    _accountButtons        = null;
                    _batchDocumentButtons  = null;
                    _selectedAccountScreen = null;
                }
            });
        }
Exemplo n.º 45
0
        public TableSelectorViewModel()
        {
            SelectTableCategoryCommand = new DelegateCommand<TableScreen>(OnSelectTableCategoryExecuted);
            TableSelectionCommand = new DelegateCommand<TableScreenItemViewModel>(OnSelectTableExecuted);
            CloseScreenCommand = new CaptionCommand<string>(Resources.Close, OnCloseScreenExecuted);
            EditSelectedTableScreenPropertiesCommand = new CaptionCommand<string>(Resources.Properties, OnEditSelectedTableScreenProperties, CanEditSelectedTableScreenProperties);
            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.SelectTable)
                    {
                        RefreshTables();
                    }
                });

            EventServiceFactory.EventService.GetEvent<GenericEvent<Message>>().Subscribe(
                x =>
                {
                    if (AppServices.ActiveAppScreen == AppScreens.TableList
                        && x.Topic == EventTopicNames.MessageReceivedEvent
                        && x.Value.Command == Messages.TicketRefreshMessage)
                    {
                        RefreshTables();
                    }
                });
        }
 public BatchDocumentCreatorViewModel(IAccountService accountService, ICacheService cacheService)
 {
     Accounts = new ObservableCollection<AccountRowViewModel>();
     _accountService = accountService;
     _cacheService = cacheService;
     CreateDocuments = new CaptionCommand<string>(string.Format(Resources.Create_f, "").Trim(), OnCreateDocuments, CanCreateDocument);
 }
Exemplo n.º 47
0
 public TransactionDocumentViewModel(IApplicationState applicationState, IInventoryService inventoryService, ICacheService cacheService)
 {
     _applicationState            = applicationState;
     _inventoryService            = inventoryService;
     _cacheService                = cacheService;
     AddTransactionItemCommand    = new CaptionCommand <string>(Resources.Add, OnAddTransactionItem, CanAddTransactionItem);
     DeleteTransactionItemCommand = new CaptionCommand <string>(Resources.Delete, OnDeleteTransactionItem, CanDeleteTransactionItem);
 }
Exemplo n.º 48
0
 public SettingsViewModel()
 {
     SaveSettingsCommand             = new CaptionCommand <string>(Resources.Save, OnSaveSettings);
     StartMessagingServerCommand     = new CaptionCommand <string>(Resources.StartClientNow, OnStartMessagingServer, CanStartMessagingServer);
     DisplayCommonAppPathCommand     = new CaptionCommand <string>(Resources.DisplayAppPath, OnDisplayAppPath);
     DisplayUserAppPathCommand       = new CaptionCommand <string>(Resources.DisplayUserPath, OnDisplayUserPath);
     EditCreditCardProcessorSettings = new CaptionCommand <string>("Credit Card Processor Settings", OnEditCreditCardProcessorSettings, CanEditCreditCardProcessorSettings);
 }
Exemplo n.º 49
0
 public NumberPadViewModel()
 {
     _exchangeRate = 1;
     TenderAllCommand = new CaptionCommand<string>(Resources.All, OnTenderAllCommand);
     TypeValueCommand = new DelegateCommand<string>(OnTypeValueExecuted);
     SetValueCommand = new DelegateCommand<string>(OnSetValue);
     DivideValueCommand = new DelegateCommand<string>(OnDivideValue);
 }
Exemplo n.º 50
0
 protected ReportViewModelBase()
 {
     _links = new List<string>();
     PrintDocumentCommand = new CaptionCommand<string>(Resources.Print, OnPrintDocument);
     RefreshFiltersCommand = new CaptionCommand<string>(Resources.Refresh, OnRefreshFilters, CanRefreshFilters);
     SaveDocumentCommand = new CaptionCommand<string>(Resources.Save, OnSaveDocument);
     FilterGroups = new ObservableCollection<FilterGroup>();
 }
Exemplo n.º 51
0
 protected ReportViewModelBase()
 {
     _links = new List <string>();
     PrintDocumentCommand  = new CaptionCommand <string>(Resources.Print, OnPrintDocument);
     RefreshFiltersCommand = new CaptionCommand <string>(Resources.Refresh, OnRefreshFilters, CanRefreshFilters);
     SaveDocumentCommand   = new CaptionCommand <string>(Resources.Save, OnSaveDocument);
     FilterGroups          = new ObservableCollection <FilterGroup>();
 }
Exemplo n.º 52
0
 public SettingsViewModel(ISettingService settingService)
 {
     _settingService = settingService;
     SaveSettingsCommand = new CaptionCommand<string>(Resources.Save, OnSaveSettings);
     StartMessagingServerCommand = new CaptionCommand<string>(Resources.StartClientNow, OnStartMessagingServer, CanStartMessagingServer);
     DisplayCommonAppPathCommand = new CaptionCommand<string>(Resources.DisplayAppPath, OnDisplayAppPath);
     DisplayUserAppPathCommand = new CaptionCommand<string>(Resources.DisplayUserPath, OnDisplayUserPath);
 }
 public EntityButtonWidgetViewModel(Widget model, ICacheService cacheService, IApplicationState applicationState, IEntityService entityService)
     : base(model, applicationState)
 {
     _cacheService = cacheService;
     _applicationState = applicationState;
     _entityService = entityService;
     ItemClickedCommand = new CaptionCommand<EntityButtonWidgetViewModel>("", OnItemClickExecute);
 }
Exemplo n.º 54
0
 public RecipeListViewModel(IInventoryService inventoryService)
 {
     _inventoryService     = inventoryService;
     TestRecipesCommand    = new CaptionCommand <string>(string.Format(Resources.Find_f, Resources.RequiredRecipes), OnTestRequiredRecipes);
     TestAllRecipesCommand = new CaptionCommand <string>(string.Format(Resources.Find_f, Resources.MissingRecipes), OnTestMissingRecipes);
     CustomCommands.Add(TestRecipesCommand);
     CustomCommands.Add(TestAllRecipesCommand);
 }
Exemplo n.º 55
0
 public ResourceEditorViewModel(ICacheService cacheService)
 {
     _cacheService = cacheService;
     CloseScreenCommand = new CaptionCommand<string>(Resources.Close, OnCloseScreen);
     SaveResourceCommand = new CaptionCommand<string>(Resources.Save, OnSaveResource);
     SelectResourceCommand = new CaptionCommand<string>(string.Format(Resources.Select_f, Resources.Resource).Replace(" ", "\r"), OnSelectResource);
     EventServiceFactory.EventService.GetEvent<GenericEvent<EntityOperationRequest<Resource>>>().Subscribe(OnEditResource);
 }
Exemplo n.º 56
0
 public TicketListViewModel(ITicketService ticketService)
 {
     _ticketService = ticketService;
     _tickets = new List<TicketButtonViewModel>();
     AddTicketCommand = new CaptionCommand<string>(string.Format(Resources.Add_f, Resources.Ticket).Replace(" ", "\r"), OnAddTicket, CanAddTicket);
     MergeTicketsCommand = new CaptionCommand<string>(Resources.MergeTickets.Replace(" ", "\r"), OnMergeTickets, CanMergeTickets);
     CloseCommand = new CaptionCommand<string>(Resources.Close.Replace(" ", "\r"), OnCloseCommand);
 }
Exemplo n.º 57
0
 public SettingsViewModel()
 {
     SaveSettingsCommand = new CaptionCommand<string>(Resources.Save, OnSaveSettings);
     StartMessagingServerCommand = new CaptionCommand<string>(Resources.StartClientNow, OnStartMessagingServer, CanStartMessagingServer);
     DisplayCommonAppPathCommand = new CaptionCommand<string>(Resources.DisplayAppPath, OnDisplayAppPath);
     DisplayUserAppPathCommand = new CaptionCommand<string>(Resources.DisplayUserPath, OnDisplayUserPath);
     EditCreditCardProcessorSettings = new CaptionCommand<string>("Credit Card Processor Settings", OnEditCreditCardProcessorSettings, CanEditCreditCardProcessorSettings);
 }
 public ResourceButtonWidgetViewModel(Widget model, ICacheService cacheService, IApplicationState applicationState, IResourceService resourceService)
     : base(model)
 {
     _cacheService = cacheService;
     _applicationState = applicationState;
     _resourceService = resourceService;
     ItemClickedCommand = new CaptionCommand<ResourceButtonWidgetViewModel>("", OnItemClickExecute);
 }
Exemplo n.º 59
0
        public ErrorReportViewModel(IEnumerable<Exception> exceptions)
        {
            Model = new ExceptionReportInfo { AppAssembly = Assembly.GetCallingAssembly() };
            Model.SetExceptions(exceptions);

            CopyCommand = new CaptionCommand<string>(Resources.Copy, OnCopyCommand);
            SaveCommand = new CaptionCommand<string>(Resources.Save, OnSaveCommand);
            SubmitCommand = new CaptionCommand<string>(Resources.Send, OnSubmitCommand);
        }
Exemplo n.º 60
0
 public TaskEditorViewModel(Widget widget, IApplicationState applicationState, ITaskService taskService, 
     ICacheService cacheService)
     : base(widget, applicationState)
 {
     _taskService = taskService;
     _cacheService = cacheService;
     Tasks = new ObservableCollection<TaskViewModel>();
     AddTaskCommand = new CaptionCommand<string>(Resources.Add, OnAddTask);
 }