private void ToggleMap(object sender, EventArgs e) { if (_mapWindow == null || _mapWindow.IsDisposed) { LoadMap(); } else { _mapWindow.Close(); mapToolStripMenuItem.Checked = false; } _settings.Save(); }