Ejemplo n.º 1
0
 public static ToolsManager GetInstance()
 {
     if (Instance == null)
     {
         Instance = new ToolsManager();
     }
     return(Instance);
 }
Ejemplo n.º 2
0
 private void WashTool(Tool tool)
 {
     //MoveTo(304, 80);
     LogWriter.GetInstance().Write("Washer start washing tool " + tool.Name);
     Thread.Sleep((int)Math.Round(tool.WashingTime * 6000));
     LogWriter.GetInstance().Write("Washer finished washing tool " + tool.Name);
     this.ToolsToWash.Remove(tool);
     ToolsManager.GetInstance().ReleaseTool(tool);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Instantiate a cooker
 /// </summary>
 /// <param name="toolsStorage"></param>
 public Cooker(int id, Washer washer, Oven oven, Position position)
 {
     this.Id             = id;
     this.ToolsStorage   = ToolsManager.GetInstance();
     this.DevicesStorage = DevicesManager.GetInstance();
     this.WasherEngine   = washer;
     this.OvenCook       = oven;
     this.Position       = position;
     this.IsAvailable    = true;
 }
Ejemplo n.º 4
0
 public CookChief(List <Cooker> cookers, Counter counterplate = null)
 {
     this.CounterPlate = counterplate;
     this.Cookers      = cookers;
     this.Menu         = new List <Recipe>();
     ToolsManager.GetInstance();
     this.GenerateMenu();
     this.CounterPlate.RoomCommunication.NewMenuDemand  += this.SendMenuDel;
     this.CounterPlate.RoomCommunication.NewOrderArrive += this.CarryOrder;
     this.SubscribeCooker();
 }