mirror of
https://github.com/MAKS-IT-COM/maksit-lto-backup.git
synced 2026-09-30 00:28:10 +02:00
22 lines
462 B
C#
22 lines
462 B
C#
using Avalonia.Controls;
|
|
|
|
|
|
namespace MaksIT.LTO.Backup.UI;
|
|
|
|
public interface IDialogService {
|
|
Window? Owner { get; set; }
|
|
|
|
Task<bool> ConfirmAsync(string title, string message);
|
|
}
|
|
|
|
public sealed class DialogService : IDialogService {
|
|
public Window? Owner { get; set; }
|
|
|
|
public async Task<bool> ConfirmAsync(string title, string message) {
|
|
if (Owner is null)
|
|
return false;
|
|
|
|
return await ConfirmDialog.ShowAsync(Owner, title, message);
|
|
}
|
|
}
|