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();
     }
 }
Ejemplo n.º 2
0
 public static DoctorShowPrescription GetInstance(MedicalRecord patientsMedicalRecord)
 {
     if (instance == null)
     {
         instance = new DoctorShowPrescription(patientsMedicalRecord);
     }
     return(instance);
 }
Ejemplo n.º 3
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) => instance = null;