Exemplo n.º 1
0
 public static EditHospitalTreatmentWindow GetInstance(Patient parientForEdit)
 {
     if (instance == null)
     {
         instance = new EditHospitalTreatmentWindow(parientForEdit);
     }
     return(instance);
 }
 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();
     }
 }
Exemplo n.º 3
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) => instance = null;