예제 #1
0
 static void Main(string[] args)
 {
     cart   = new List <Product>();
     market = new List <Product>();
     SupplyStore();
     HermanaReta += new Hermana(object.sacarCosa);
     while (true)
     {
         PrintHeader();
         Console.WriteLine("¿Que quieres hacer?\n");
         Console.WriteLine("\t1. Ver Receta");
         Console.WriteLine("\t2. Comprar");
         Console.WriteLine("\t3. Ver carrito");
         Console.WriteLine("\t4. Pagar");
         Console.WriteLine("\t5. Salir");
         while (true)
         {
             String answer = Console.ReadLine();
             if (answer == "1")
             {
                 ShowRecipe();
                 break;
             }
             else if (answer == "2")
             {
                 WalkAround();
                 break;
             }
             else if (answer == "3")
             {
                 PrintCart();
                 break;
             }
             else if (answer == "4")
             {
                 Pay();
                 break;
             }
             else if (answer == "5")
             {
                 Environment.Exit(1);
             }
         }
     }
 }
 public void Suscribir()
 {
     Equivocado += new Hermana(OnEquivocado);
 }