2024-12-14 13:32:15 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProgLab1.GUI
|
|
|
|
|
{
|
2024-12-22 11:40:58 +04:00
|
|
|
|
public static class Dialogs
|
2024-12-14 13:32:15 +04:00
|
|
|
|
{
|
|
|
|
|
public static bool Exit()
|
|
|
|
|
{
|
|
|
|
|
DialogResult result = MessageBox.Show("Вы уверены, что хотите закрыть программу?", "Подтверждение", MessageBoxButtons.YesNo);
|
|
|
|
|
if (result == DialogResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
Environment.Exit(0);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2024-12-22 11:40:58 +04:00
|
|
|
|
|
|
|
|
|
public static bool GameOver(string message)
|
|
|
|
|
{
|
|
|
|
|
DialogResult result = MessageBox.Show(message, "Игра окончена", MessageBoxButtons.OK);
|
|
|
|
|
return result == DialogResult.OK;
|
|
|
|
|
}
|
2024-12-14 13:32:15 +04:00
|
|
|
|
}
|
|
|
|
|
}
|