public static ShowPatientInformationWindow GetInstance(Patient patient)
 {
     if (instance == null)
     {
         instance = new ShowPatientInformationWindow(patient);
     }
     return(instance);
 }
示例#2
0
 private void CheckKeyPress()
 {
     if (Keyboard.IsKeyDown(Key.Enter))
     {
         ShowPatientInformationWindow.GetInstance(_appointmentToShow.Patient).ShowDialog();
     }
     else if (Keyboard.IsKeyDown(Key.Escape))
     {
         this.Close();
     }
 }
 private void CheckKeyPress()
 {
     if (Keyboard.IsKeyDown(Key.Enter))
     {
         ShowPatientInformationWindow.GetInstance((Patient)patientsTable.SelectedItem).Show();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.T))
     {
         if (((Patient)patientsTable.SelectedItem).hospitalTreatment != null)
         {
             EditHospitalTreatmentWindow.GetInstance((Patient)patientsTable.SelectedItem).Show();
         }
     }
     else if (Keyboard.IsKeyDown(Key.Escape))
     {
         this.Close();
     }
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) => instance = null;