IViewManager for working with the UI SyrveAgent
Tags:
v9
A new IViewManager has been implemented for working with the user interface of SyrveAgent (ServiceControl).
Context
When adding buttons to the Windows service menu of SyrveAgent through AddButtonToWindowsServiceMenu, plugins gain access to IViewManager for displaying dialogs and controls.
Implemented Features
The following IViewManager methods are available for working with the UI of SyrveAgent:
Input Dialogs:
ShowInputDialog— input text, number, or dateShowExtendedInputDialog— extended input dialogShowKeyboard— on-screen keyboardShowExtendedKeyboardDialog— extended keyboard
Data Selection and Input:
ShowChooserPopup— selection from a listShowQuantityChangerPopup— change quantityShowDateNumpadPopup— input dateShowCalendarPopup— calendarShowDateTimePopup— select date and time
Information Messages:
ShowOkPopup— message with OK buttonShowClosePopup— message with Close buttonShowErrorPopup— error message
Confirmation Dialogs:
ShowYesNoPopup— Yes/NoShowOkCancelPopup— OK/CancelShowRetryCancelPopup— Retry/CancelShowYesNoCancelPopup— Yes/No/CancelShowRetryIgnoreCancelPopup— Retry/Ignore/Cancel
Permission Checks:
ShowCheckPermissionPopup— check a single permissionShowCheckPermissionsPopup— check multiple permissions
Other:
ChangeProgressBarMessage— change progress bar text
Example Usage
PluginContext.Operations.AddButtonToWindowsServiceMenu("Plugin Settings", (vm) =>
{
var input = vm.ShowInputDialog("Enter value", InputDialogTypes.Number, null, "OK", "Cancel");
if (input != null)
{
vm.ShowOkPopup("Setting saved", $"Value: {input}");
}
});
This allows plugins to create a full-fledged user interface for working through the Windows service SyrveAgent without the need for SyrveFront.