20 lines
720 B
C#
20 lines
720 B
C#
using DevExpress.Blazor;
|
|
using DevExpress.Blazor.Internal;
|
|
|
|
namespace FruitBankHybrid.Shared.Extensions;
|
|
|
|
public static class DevextremeComponentExtension
|
|
{
|
|
public static async Task ShowMessageBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle, MessageBoxType messageBoxType = MessageBoxType.Alert)
|
|
{
|
|
var messageBoxOptions = new MessageBoxOptions
|
|
{
|
|
Title = title,
|
|
Text = text,
|
|
RenderStyle = messageBoxRenderStyle,
|
|
};
|
|
|
|
if (messageBoxType == MessageBoxType.Alert) await messageBox.AlertAsync(messageBoxOptions);
|
|
else await messageBox.ConfirmAsync(messageBoxOptions);
|
|
}
|
|
} |