private void Exit() { // We must manually tidy up and remove the icon before we exit. // Otherwise it will be left behind until the user mouses over. _icon.Visible = false; // Abort all threads if (_serverThread != null && _serverThread.IsAlive) { _serverThread.Abort(); } if (_luaThread != null && _luaThread.IsAlive) { _luaThread.Abort(); } //_gtaThread.Abort(); if (_clientThread != null && _clientThread.IsAlive) { _clientThread.Abort(); } LuaScripting.CloseScripts(); Application.Exit(); }
private void Application_ApplicationExit(object sender, EventArgs e) { LuaScripting.CloseScripts(); Exit(); }