public static NewIngredientWindow GetInstance(List <MedicineIngredient> medicineIngredientList)
 {
     if (instance == null)
     {
         instance = new NewIngredientWindow(medicineIngredientList);
     }
     return(instance);
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     instance = null;
 }
 private void addNewIngredientButton_Click(object sender, RoutedEventArgs e)
 {
     NewIngredientWindow.GetInstance(medicineIngredientList).ShowDialog();
     RefreshIngredientsListBox();
 }