Example #1
0
 public bool CanMoveBackward(ConveyorType type)
 {
     if (type == ConveyorType.Assembly)
     {
         return (_conveyorTypeMap[type].Position == ConveyorPosition.Middle) ||
             (_conveyorTypeMap[type].Position == ConveyorPosition.Left);
     }
     else
     {
         return _conveyorTypeMap[type].Position == ConveyorPosition.Left;
     }
 }
Example #2
0
 public bool CanMoveForward(ConveyorType type)
 {
     if (type == ConveyorType.Assembly)
     {
         return (_conveyorTypeMap[type].Position == ConveyorPosition.Right) ||
             (_conveyorTypeMap[type].Position == ConveyorPosition.Middle);
     }
     else
     {
         return _conveyorTypeMap[type].Position == ConveyorPosition.Right;
     }
 }
Example #3
0
 public void SetPosition(ConveyorType type, ConveyorPosition position)
 {
     _conveyorTypeMap[type].Position = position;
 }
Example #4
0
 private void MoveConveyorAsync(ConveyorType type, ConveyorAction action)
 {
     Task.Run(() =>
         {
             _actionMap[action](_conveyorTypeMap[type] as IConveyor);
             if (type == ConveyorType.Assembly)
             {
                 Thread.Sleep(4000);
             }
             IsRunning = false;
             OnCompleted(new ControllerEventArgs() { OperationStatus = ControllerOperationStatus.Succeeded });
         });
 }
Example #5
0
 public ConveyorPosition GetCurrentPosition(ConveyorType type)
 {
     return _conveyorTypeMap[type].Position;
 }