AIParkingApplicationForm - Closing Form Show Confirmation Dialog
This commit is contained in:
parent
74855b6467
commit
9d25ac394b
|
@ -209,14 +209,22 @@ namespace AIParkingApplication
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AIParkingApplicationForm_FormClosing(object sender, FormClosingEventArgs e)
|
|
||||||
{
|
|
||||||
Application.Exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AIParkingApplicationForm_Load(object sender, EventArgs e)
|
private void AIParkingApplicationForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
InitAllLanes();
|
InitAllLanes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AIParkingApplicationForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult closeAppDialog = MessageBox.Show("Bạn chắc chắn thoát phần mềm quản lý bãi xe?", "Cảnh báo đóng ứng dụng: AIParking - Hệ thống quản lý bãi đỗ xe", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
|
||||||
|
if (closeAppDialog == DialogResult.OK)
|
||||||
|
{
|
||||||
|
Environment.Exit(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user