private void menuLoad_Click(object sender, RoutedEventArgs e) { LoadNoteWindow loadWin = new LoadNoteWindow(); loadWin.Owner = this; loadWin.Show(); }
private void createWindow(WinType type) { Window win = null; switch (type) { case WinType.WinNote: case WinType.WinLoadNote: if (type == WinType.WinNote) { win = new NoteWindow(); } else { win = new LoadNoteWindow(); } win.Owner = this; win.Show(); break; case WinType.WinSignIn: case WinType.WinRegister: for (int i = OwnedWindows.Count - 1; i >= 0; i--) { OwnedWindows[i].Close(); } if (OwnedWindows.Count > 0) { break; } if (type == WinType.WinSignIn) { win = new SignInWindow(); } else { win = new RegisterWindow(); } win.Owner = this; win.ShowDialog(); break; } }