Fix: inproper closure while connections open

This commit is contained in:
VladMordock
2021-02-28 11:41:48 +01:00
parent bedceb171d
commit da3a1d1fe9

View File

@@ -399,6 +399,8 @@ namespace Perun_v1
private void con_Button_Quit_Click(object sender, EventArgs e) private void con_Button_Quit_Click(object sender, EventArgs e)
{ {
// Try to close app // Try to close app
if (tim_MySQL.Enabled == false)
{
DialogResult dialogResult = MessageBox.Show("Are you sure to exit Perun?", "Question", MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question); DialogResult dialogResult = MessageBox.Show("Are you sure to exit Perun?", "Question", MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question);
if (dialogResult == DialogResult.Yes) if (dialogResult == DialogResult.Yes)
{ {
@@ -411,6 +413,9 @@ namespace Perun_v1
{ {
//do nothing //do nothing
} }
} else {
MessageBox.Show("You cannot exit Perun while the connections are open. Stop the server and try again.");
}
} }
private void form_Main_SendToTray() private void form_Main_SendToTray()