public static DoctorAddNewIngredientWindow GetInstance(Medicine medicineToAddNewIngredient)
 {
     if (instance == null)
     {
         instance = new DoctorAddNewIngredientWindow(medicineToAddNewIngredient);
     }
     return(instance);
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     instance = null;
 }
 private void addIngredientButton_Click(object sender, RoutedEventArgs e) =>
 DoctorAddNewIngredientWindow.GetInstance(_medicineToPreview).ShowDialog();