private void CheckKeyPress()
 {
     if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.P))
     {
         PatientPreviewWindow.GetInstance(_loggedDoctor).Show();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.K))
     {
         DoctorAppointmentsManagementWindow.GetInstance(_loggedDoctor).Show();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.M))
     {
         MedicinePreviewWindow.GetInstance().Show();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.I))
     {
         CreateReportWindow.GetInstance().Show();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.Q))
     {
         this.Close();
     }
     else if ((Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)) && Keyboard.IsKeyDown(Key.F))
     {
         DoctorFeedback.GetInstance(_loggedDoctor).Show();
     }
 }
 public static MedicinePreviewWindow GetInstance()
 {
     if (instance == null)
     {
         instance = new MedicinePreviewWindow();
     }
     return(instance);
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     instance = null;
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     MedicinePreviewWindow.GetInstance().RefreshTable();
     instance = null;
 }