public static ToolsManager GetInstance() { if (Instance == null) { Instance = new ToolsManager(); } return(Instance); }
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); }
/// <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; }
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(); }