当前位置: 首页>>代码示例>>C#>>正文


C# CaptionCommand类代码示例

本文整理汇总了C#中CaptionCommand的典型用法代码示例。如果您正苦于以下问题:C# CaptionCommand类的具体用法?C# CaptionCommand怎么用?C# CaptionCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CaptionCommand类属于命名空间,在下文中一共展示了CaptionCommand类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DocumentCreatorViewModel

 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);
 }
开发者ID:yemreguney,项目名称:SambaPOS-3,代码行数:7,代码来源:DocumentCreatorViewModel.cs

示例2: TaskViewModel

 public TaskViewModel(Task model, IDiagram widget, IMessagingService messagingService)
 {
     _widget = widget;
     _messagingService = messagingService;
     Model = model;
     ToggleCompletedCommand = new CaptionCommand<string>("¨", OnToggleCompleted);
 }
开发者ID:roniwahyu,项目名称:SambaPOS-3,代码行数:7,代码来源:TaskViewModel.cs

示例3: PaymentEditorViewModel

        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);
        }
开发者ID:hpbaotho,项目名称:sambapos,代码行数:25,代码来源:PaymentEditorViewModel.cs

示例4: AutomationButtonWidgetViewModel

 public AutomationButtonWidgetViewModel(Widget widget, IApplicationState applicationState, IAutomationDao automationDao)
     : base(widget, applicationState)
 {
     _applicationState = applicationState;
     _automationDao = automationDao;
     ItemClickedCommand = new CaptionCommand<AutomationButtonWidgetViewModel>("", OnItemClicked);
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:AutomationButtonWidgetViewModel.cs

示例5: WarehouseInventoryViewModel

 public WarehouseInventoryViewModel(IInventoryService inventoryService, ICacheService cacheService, IApplicationState applicationState)
 {
     _inventoryService = inventoryService;
     _cacheService = cacheService;
     _applicationState = applicationState;
     WarehouseButtonSelectedCommand = new CaptionCommand<Warehouse>("", OnWarehouseSelected);
 }
开发者ID:shuxingliu,项目名称:SambaPOS-3,代码行数:7,代码来源:WarehouseInventoryViewModel.cs

示例6: TicketTagListViewModel

 public TicketTagListViewModel(ICacheService cacheService)
 {
     _cacheService = cacheService;
     SelectionCommand = new DelegateCommand<TicketTagGroup>(OnSelectTicketTagGroup);
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnClose);
     TicketTagValueViewModels = new ObservableCollection<TicketTagValueViewModel>();
 }
开发者ID:Spanky81,项目名称:SambaPOS-3,代码行数:7,代码来源:TicketTagListViewModel.cs

示例7: MenuItemSelectorViewModel

        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>();
        }
开发者ID:Spanky81,项目名称:SambaPOS-3,代码行数:25,代码来源:MenuItemSelectorViewModel.cs

示例8: TicketEditorViewModel

        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();
                 }
             });
        }
开发者ID:basio,项目名称:veropos,代码行数:33,代码来源:TicketEditorViewModel.cs

示例9: AccountSelectorViewModel

        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;
                }
            });
        }
开发者ID:savasl,项目名称:SambaPOS-3,代码行数:25,代码来源:AccountSelectorViewModel.cs

示例10: OrderStateEditorViewModel

 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);
 }
开发者ID:Spanky81,项目名称:SambaPOS-3,代码行数:7,代码来源:OrderStateEditorViewModel.cs

示例11: TicketViewModel

        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);
            }
        }
开发者ID:betology,项目名称:SambaPOS-3,代码行数:30,代码来源:TicketViewModel.cs

示例12: TicketEntityListViewModel

 public TicketEntityListViewModel(ICacheService cacheService)
 {
     _cacheService = cacheService;
     SelectionCommand = new DelegateCommand<Entity>(OnSelectEntity);
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnClose);
     EntityList = new ObservableCollection<Entity>();
 }
开发者ID:shuxingliu,项目名称:SambaPOS-3,代码行数:7,代码来源:TicketEntityListViewModel.cs

示例13: AccountButtonSelectorViewModel

        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();
                    }
                });
        }
开发者ID:basio,项目名称:SambaPOS-3,代码行数:34,代码来源:AccountButtonSelectorViewModel.cs

示例14: BatchDocumentCreatorViewModel

 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);
 }
开发者ID:shuxingliu,项目名称:SambaPOS-3,代码行数:7,代码来源:BatchDocumentCreatorViewModel.cs

示例15: TicketTagListViewModel

 public TicketTagListViewModel(IApplicationState applicationState)
 {
     _applicationState = applicationState;
     SelectionCommand = new DelegateCommand<TicketTagGroup>(OnSelectTicketTagGroup);
     CloseCommand = new CaptionCommand<string>(Resources.Close, OnClose);
     TicketTagValueViewModels = new ObservableCollection<TicketTagValueViewModel>();
 }
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:TicketTagListViewModel.cs


注:本文中的CaptionCommand类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。