private void btnManageAreas_Click(object sender, System.Windows.RoutedEventArgs e) { if (_manageAreasWindow == null) { _manageAreasWindow = new ManageAreasWindow(); _manageAreasWindow.Closed += Window_Closed; } _manageAreasWindow.Show(); _manageAreasWindow.WindowState = WindowState.Normal; }
void Window_Closed(object sender, EventArgs e) { if (sender is ManageAreasWindow) { _manageAreasWindow = null; } else if (sender is ManagePatientsWindow) { _managePatientNotesWindow = null; } }