public static void CloseNotesWindow() { if (notesWindow != null) { notesWindow.Close(); notesWindow = null; } }
private void MenuItemNotes_Click(object sender, RoutedEventArgs e) { if (notesWindow != null) { notesWindow.Close(); } bool showTools = false; if (sender != null) { showTools = true; } notesWindow = new NotesDialog(showTools); try { notesWindow.Top = 200; notesWindow.Left = 500; notesWindow.Show(); } catch { MessageBox.Show("Notes could not be displayed"); } }