Library containing service definitions for infsoft's LocAware One application
$ dotnet add package Infsoft.WPE.App.ServicesThis library provides the interfaces of all publicly available services, which can be used in an app implementation.
Additionally, two delegating handlers are defined.
These serve to use the caching service via CachingHandler and add common headers to every request DefaultHeadersHandler.
var config = ToastConfig.WithTitle("Data Saved")
.WithSubTitle("Your changes were successfully stored.") // Optional: subtitle text
.WithIconName("check-circle") // Optional: icon name or URL
.WithCloseButton(true) // Optional: show close button
.CloseAfter(3000) // Optional: auto-close after milliseconds
.WithAlignment(ToastConfigAlignment.TopRight) // Optional: position on screen
.WithColor(ToastConfigColor.Green); // Optional: predefined color
// .WithCustomColor("#00FF99") // Optional: use custom HEX instead
// .NotSelfClosing() // Optional: require manual close
ToastService.Show(config);
var buttons = new List<DialogOptionsButton>
{
DialogOptionsButton.WithText("Submit")
.OnClicked(() => DeleteBooking(lockerItem.Item1, lockerItem.Item2))
.AsPrimary(),
DialogOptionsButton.WithText("Cancel")
.AsSecondary()
};
// Create a dialog configuration using the fluent API
var config = DialogOptions.WithTitle("Open locker")
.WithDescription("Are you sure you want to open this locker?") // Optional: add one or more message lines
.WithIconName("delete") // Optional: icon name or URL
.WithButtons(buttons) // Optional: custom button list
.DisableBackgroundClose(); // Optional: disable closing by clicking outside
DialogService.Show(config);