29 lines
824 B
C#
29 lines
824 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProgLab1.GUI
|
|
{
|
|
public static class Dialogs
|
|
{
|
|
public static bool Exit()
|
|
{
|
|
DialogResult result = MessageBox.Show("Вы уверены, что хотите закрыть программу?", "Подтверждение", MessageBoxButtons.YesNo);
|
|
if (result == DialogResult.Yes)
|
|
{
|
|
Environment.Exit(0);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public static bool GameOver(string message)
|
|
{
|
|
DialogResult result = MessageBox.Show(message, "Игра окончена", MessageBoxButtons.OK);
|
|
return result == DialogResult.OK;
|
|
}
|
|
}
|
|
}
|