private void CheckKeyPress()
 {
     if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.A))
     {
         AnamnesisWindow.GetInstance(_patientToShowMedicalRecord.MedicalRecord).ShowDialog();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.P))
     {
         AmnesisPreviewWindow.GetInstance(_patientToShowMedicalRecord).ShowDialog();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.R))
     {
         AddPrescriptionWindow.GetInstance(_patientToShowMedicalRecord).ShowDialog();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.W))
     {
         DoctorShowPrescription.GetInstance(_patientToShowMedicalRecord.MedicalRecord).ShowDialog();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.T))
     {
         DoctorAllergensPreviewWindow.GetInstance(_patientToShowMedicalRecord).ShowDialog();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.U))
     {
         ReferralLetterWindow.GetInstance(_patientToShowMedicalRecord).ShowDialog();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.Q))
     {
         this.Close();
     }
 }
 public static ReferralLetterWindow GetInstance(Patient patientForReferralLetter)
 {
     if (instance == null)
     {
         instance = new ReferralLetterWindow(patientForReferralLetter);
     }
     return(instance);
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) => instance = null;