예제 #1
0
 public override void Initialize(BasicWarehouse w)
 {
     base.Initialize(w);
     try
     {
         base.Initialize(w);
         if (ConveyorInfo != null)
         {
             ConveyorInfo.Initialize();
         }
         if (XmlRouteNode != null)
         {
             Route = new RouteNode {
                 Next = Warehouse.FindConveyorBasic(XmlRouteNode.Next), Cost = XmlRouteNode.Cost
             };
             if (Route.Next is Crane)
             {
                 Warehouse.ConnectCraneInConveyor(this, Route);
             }
         }
     }
     catch (Exception ex)
     {
         Warehouse.AddEvent(Event.EnumSeverity.Error, Event.EnumType.Exception, ex.Message);
         throw new ConveyorException(String.Format("{0} Conveyor.Initialize failed", Name));
     }
 }
예제 #2
0
 public override void Initialize(BasicWarehouse w)
 {
     try
     {
         Warehouse    = w;
         Communicator = Warehouse.Communicator[CommunicatorName];
         if (ConveyorInfo != null)
         {
             ConveyorInfo.Name = Name;
             ConveyorInfo.Initialize();
         }
     }
     catch (Exception ex)
     {
         Warehouse.AddEvent(Event.EnumSeverity.Error, Event.EnumType.Exception, ex.Message);
         throw new ConveyorException(String.Format("{0} MainPanel.Initialize failed", Name));
     }
 }