void ShowServerManager(bool force = false) { if (serverForm == null) { serverForm = new ServerForm(); serverForm.Closing += (sender, e) => { serverForm.Hide(); e.Cancel = true; if (!IsClosing) { if (Db == null) { Init(); } } }; } if (force) { serverForm.ShowDialog(); } else { serverForm.Show(); serverForm.Activate(); } }
private void Hide(object sender, EventArgs e) { client.Hide(); enemy.Hide(); server.Hide(); }