private void EditSubjectInfoButton_Click(object sender, RoutedEventArgs e) { if (EditSubjectInfoWindow != null) { return; } EditSubjectInfoWindow = new EditSubjectInfoWindow(this, _connectionString, _userCredential, SubjectInfo[SubjectInfoDataGrid.SelectedIndex]); EditSubjectInfoWindow.Show(); }