private void CheckKeyPress() { if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.P)) { PatientPreviewWindow.GetInstance(_loggedDoctor).Show(); } else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.K)) { DoctorAppointmentsManagementWindow.GetInstance(_loggedDoctor).Show(); } else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.M)) { MedicinePreviewWindow.GetInstance().Show(); } else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.I)) { CreateReportWindow.GetInstance().Show(); } else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.Q)) { this.Close(); } else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.F)) { DoctorFeedback.GetInstance(_loggedDoctor).Show(); } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { MedicinePreviewWindow.GetInstance().RefreshTable(); instance = null; }