protected override void OnClosing(CancelEventArgs e)
{
if (TopMostMessageBox.Show(
"Are you sure you want to quit the game?",
"Octgn",
MessageBoxButton.YesNo,
MessageBoxImage.Question) != MessageBoxResult.Yes)
e.Cancel = true;
if (e.Cancel == false)
{
IsRealClosing = true;
}
base.OnClosing(e);
}