Click or drag to resize

IOperationService.AddButtonToPaymentScreen Method

Adds a button to the payment screen.

Namespace:  Resto.Front.Api
Assembly:  Resto.Front.Api.V7 (in Resto.Front.Api.V7.dll)
Syntax
C#
(Guid buttonId, IDisposable buttonRegistration) AddButtonToPaymentScreen(
	string caption,
	bool isChecked,
	bool isEnabled,
	Action<(IOrder order, IOperationService os, IViewManager vm, (Guid , string , bool , string ) state)> callback,
	string iconGeometry = null
)

Parameters

caption
Type: System.String
Text to display on the button.
isChecked
Type: System.Boolean
Indicates whether the button is checked.
isEnabled
Type: System.Boolean
Is the button available for user interaction.
callback
Type: System.Action<ValueTuple<IOrder, IOperationService, IViewManager, ValueTuple<Guid, String, Boolean, String>>>
Button click event handler.
iconGeometry (Optional)
Type: System.String
Path geometry to show icon on the button. Path markup syntax is described here: https://docs.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/path-markup-syntax?view=netframeworkdesktop-4.8

Return Value

Type: ValueTuple<Guid, IDisposable>
Method returns the buttonId and the buttonRegistration. Use the method's buttonRegistration property in the return value to remove the button or it will be automatically removed when plugin is unloaded. Use the method's buttonId property in the return value to identify the button for updates.
See Also