static void Main(string[] args) { DrinkDispenser model = new DrinkDispenser(); model.LoadDispenser(); DispenserView view = new DispenserView(); DispenserController controller = new DispenserController(view, model); controller.UpdateDrink(); bool valid = true; string lecture = ""; do { lecture = ""; valid = true; Console.Write("\n choisissez un article : "); lecture = Console.ReadLine(); Console.WriteLine(lecture); if (lecture == "") { Console.WriteLine("votre choix <" + lecture + "> n'est pas valide = > recommencez "); valid = false; } } while (!valid); controller.UpdateChange(); Console.ReadKey(); }
public DispenserController(DispenserView view, DrinkDispenser model) => (View, Model) = (view, model);