📅  最后修改于: 2022-03-11 14:49:16.660000             🧑  作者: Mango
var response = MessageBox.Show("Do you really want to exit?", "Exiting...",
MessageBoxButton.YesNo, MessageBoxImage.Exclamation);
if (response == MessageBoxResult.No)
{
e.Cancel = true;
}
else
{
Environment.Exit(0);
}