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 AnamnesisWindow GetInstance(MedicalRecord patientsMedicalRecord)
 {
     if (instance == null)
     {
         instance = new AnamnesisWindow(patientsMedicalRecord);
     }
     return(instance);
 }
示例#3
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     instance = null;
 }