using PmsSecondaryPackaging.Interface.Model.Carrier;
using PmsSecondaryPackaging.Interface.Model.StepBook;
using PmsSecondaryPackaging.Interface.Model.TaskBook;
using PmsSecondaryPackaging.TaskManager.TaskBookBehavior;
using System.Collections.Generic;
using System.Threading;

namespace ProjectManagementSystem.TaskBookEvent
{
    public class TaskBookBehavior_65053 : BaseTaskBookBehavior
    {
        public TaskBookBehavior_65053() : base(65053)
        {

        }

        public override bool TaskBookOperator(TaskDetailInfoModel taskDetailInfo, List<StepDetailInfoModel> taskStepInfoList, CarrierInfoModel carrierInfo)
        {
            StepJumpInfoModel stepJumpInfoModel = new StepJumpInfoModel();
            stepJumpInfoModel.TaskID = taskDetailInfo.TaskID;
            stepJumpInfoModel.StepID = 1;
            bool success = InterfaceService.TaskStepSkip(stepJumpInfoModel, out string Message);
            while (!success)
            {
                success = InterfaceService.TaskStepSkip(stepJumpInfoModel, out Message);
                Thread.Sleep(1000);
            }
            return true;
        }
    }
}
