mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 14:45:39 +02:00
Fix: inproper closure while connections open
This commit is contained in:
@@ -399,17 +399,22 @@ 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
|
||||||
DialogResult dialogResult = MessageBox.Show("Are you sure to exit Perun?", "Question", MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question);
|
if (tim_MySQL.Enabled == false)
|
||||||
if (dialogResult == DialogResult.Yes)
|
|
||||||
{
|
{
|
||||||
form_Main_SaveSettings();
|
DialogResult dialogResult = MessageBox.Show("Are you sure to exit Perun?", "Question", MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question);
|
||||||
|
if (dialogResult == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
form_Main_SaveSettings();
|
||||||
|
|
||||||
AppCanClose = true; // Save settings on exit
|
AppCanClose = true; // Save settings on exit
|
||||||
this.Close(); // Allow to exit application
|
this.Close(); // Allow to exit application
|
||||||
}
|
}
|
||||||
else if (dialogResult == DialogResult.No)
|
else if (dialogResult == DialogResult.No)
|
||||||
{
|
{
|
||||||
//do nothing
|
//do nothing
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
MessageBox.Show("You cannot exit Perun while the connections are open. Stop the server and try again.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user