21 lines
592 B
C#
21 lines
592 B
C#
using Cowain.Base.Helpers;
|
|
using Ke.Bee.Localization.Localizer.Abstractions;
|
|
using System.Threading.Tasks;
|
|
using Ursa.Controls;
|
|
|
|
namespace Cowain.TestProject.Views;
|
|
public partial class MainWindow : UrsaWindow
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override async Task<bool> CanClose()
|
|
{
|
|
ILocalizer _l = ServiceLocator.GetRequiredService<ILocalizer>();
|
|
var result = await MessageBox.ShowOverlayAsync(_l["CloseAppDialog"], _l["ExitTitle"], button: MessageBoxButton.YesNo);
|
|
return result == MessageBoxResult.Yes;
|
|
}
|
|
|
|
} |