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