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();
     }
 }
Пример #2
0
 public static DoctorAllergensPreviewWindow GetInstance(Patient patientToViewAllAllergens)
 {
     if (instance == null)
     {
         instance = new DoctorAllergensPreviewWindow(patientToViewAllAllergens);
     }
     return(instance);
 }
Пример #3
0
 private void Window_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
 {
     instance = null;
 }