本文整理汇总了C#中CaptionCommand类的典型用法代码示例。如果您正苦于以下问题:C# CaptionCommand类的具体用法?C# CaptionCommand怎么用?C# CaptionCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CaptionCommand类属于命名空间,在下文中一共展示了CaptionCommand类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: PaymentEditorViewModel
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);
}
开发者ID:neapolis,项目名称:SambaPOS-3,代码行数:28,代码来源:PaymentEditorViewModel.cs
示例17: AutomationCommandValueSelectorViewModel
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);
}
开发者ID:GHLabs,项目名称:SambaPOS-3,代码行数:7,代码来源:AutomationCommandValueSelectorViewModel.cs
示例18: PaymentEditorViewModel
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";
}
开发者ID:betology,项目名称:SambaPOS-3,代码行数:34,代码来源:PaymentEditorViewModel.cs
示例19: TableSelectorViewModel
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();
}
});
}
开发者ID:hpbaotho,项目名称:sambapos,代码行数:29,代码来源:TableSelectorViewModel.cs
示例20: DepartmentButtonViewModel
public DepartmentButtonViewModel(DepartmentSelectorViewModel parentViewModel,
IApplicationState applicationState)
{
_parentViewModel = parentViewModel;
_applicationState = applicationState;
DepartmentSelectionCommand = new CaptionCommand<string>("Select", OnSelectDepartment);
}
开发者ID:yemreguney,项目名称:SambaPOS-3,代码行数:7,代码来源:DepartmentButtonViewModel.cs
注:本文中的CaptionCommand类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论