// Als de form geclosed wordt word hij gelijk naar het homepage geredirect private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Memory.HomePage f2 = new Memory.HomePage(); f2.Tonen(); Dispose(); GC.Collect(); }
private void GameServer_FormClosing(object sender, FormClosingEventArgs e) { Memory.HomePage f2 = new Memory.HomePage(); f2.Tonen(); Dispose(); GC.Collect(); try { ServerHost.Listener.Stop(); } catch { } try { ServerHost.Client.Close(); } catch { } try { ServerClient.Client.Close(); } catch { } }