private void CoreUI_FormClosing(object sender, FormClosingEventArgs e)
{
Globals.AttackOn = false;
Globals.AttackMode = false;
Globals.Terminate = true;
if (RoomsPanel.Rooms.Count > 0)
{
RegistryUtil.Save();
IniWriter.Save();
ConfigSerializer.WriteFile("config.xml", Settings);
}
// clean up notifyicon
if (mNotifyIcon != null)
{
mNotifyIcon.Visible = false;
mNotifyIcon.Dispose();
mNotifyIcon = null;
}
Application.Exit();
Process.GetCurrentProcess().Kill();
}