Esempio n. 1
0
        private void OnInitExecutingOrder(Event e)
        {
            this.CurrentOrder = (e as Navigator.DrinkOrderProducedEvent)?.DrinkOrder;

            if (this.CurrentOrder != null)
            {
                this.WriteLine("<Robot> Received new Drink Order. Executing ...");
                this.ExecuteOrder();
            }
        }
Esempio n. 2
0
 private void FinishOrder()
 {
     this.WriteLine("<Robot> Finished serving the order. Retreating.");
     this.WriteLine("==================================================");
     this.WriteLine(string.Empty);
     this.MoveTo(StartingLocation);
     this.CurrentOrder = null;
     this.Monitor <LivenessMonitor>(new LivenessMonitor.IdleEvent());
     if (this.RunForever)
     {
         this.RaiseGotoStateEvent <Active>();
     }
     else
     {
         this.RaiseGotoStateEvent <FinishState>();
     }
 }
Esempio n. 3
0
 public DrinkOrderProducedEvent(DrinkOrder drinkOrder)
 {
     this.DrinkOrder = drinkOrder;
 }