Custom MessageBoxDialog (#9147)

This commit is contained in:
DHR60
2026-04-19 09:06:15 +00:00
committed by GitHub
parent b604a5b787
commit 171ed6f58f
7 changed files with 94 additions and 6 deletions
@@ -0,0 +1,27 @@
using v2rayN.Desktop.Common;
namespace v2rayN.Desktop.Views;
public partial class MessageBoxDialog : Window
{
public MessageBoxDialog(string caption, string message)
{
InitializeComponent();
Title = caption;
txtMessage.Text = message;
btnYes.Click += BtnYes_Click;
btnNo.Click += BtnNo_Click;
}
private void BtnYes_Click(object? sender, RoutedEventArgs e)
{
Close(ButtonResult.Yes);
}
private void BtnNo_Click(object? sender, RoutedEventArgs e)
{
Close(ButtonResult.No);
}
}