void RobotController_Move(LumbarRobotController.PositionArgs args)
 {
         //if (ActionList[CurrentIndex].ActionId == (int)ActionEnum.Rotation)
         if (Action == EvaluateActionEnum.RotationRangeLeft || Action == EvaluateActionEnum.RotationRangeRight
             || Action == EvaluateActionEnum.RotationStrengthRigth || Action == EvaluateActionEnum.RotationStrengthLeft)
         {
             if (args.Package.Code == ResponseCodes.RotationData)
             {
                 this.Dispatcher.Invoke(new Action(() =>
                 {
                     eilelc21.loginRun(args.Package.RotationAngle);
                     if (LumbarRobotController.RobotController.IsReady)
                     {
                         if (LumbarRobotController.RobotController.IsDrawLine())
                         {
                             sinWpf1.DrawRunLine(args.Package.RotationAngle);
                         }
                     }
                 }
                 ));
             }
         }
         else
         {
             if (args.Package.Code == ResponseCodes.BendStretchData)
             {
                 this.Dispatcher.Invoke(new Action(() =>
                 {
                     eilelc21.loginRun(args.Package.BendStretchAngle - (LumbarRobotController.RobotController.HomingAngle - LumbarRobotController.RobotController.PushRodAngle));
                     if (LumbarRobotController.RobotController.IsReady)
                     {
                         if (LumbarRobotController.RobotController.IsDrawLine())
                         {
                             sinWpf1.DrawRunLine(args.Package.BendStretchAngle - (LumbarRobotController.RobotController.HomingAngle - LumbarRobotController.RobotController.PushRodAngle));
                         }
                     }
                 }
                 ));
             }
         }
 }
 void RobotController_Alarm(LumbarRobotController.AlarmArgs e)
 {
     
     Application.Current.Dispatcher.Invoke(new Action(() =>
     {
         ShowAlarmDialog();
     }));
 }
 void RobotController_Move(LumbarRobotController.PositionArgs args)
 {
     if ((ActionList != null && ActionList.Count > CurrentIndex) || fitType!= LumbarRobot.FitType.None)
     {
         //if (ActionList[CurrentIndex].ActionId == (int)ActionEnum.Rotation)
         if(LumbarRobotController.RobotController.currentControl.Action == ActionEnum.Rotation)
         {
             if (args.Package.Code == ResponseCodes.RotationData)
             {
                 this.Dispatcher.Invoke(new Action(() =>
                 {
                     eilelc21.loginRun(args.Package.RotationAngle);
                     if (LumbarRobotController.RobotController.IsReady)
                     {
                         if (LumbarRobotController.RobotController.IsDrawLine())
                         {
                             sinWpf1.DrawRunLine(args.Package.RotationAngle);
                         }
                     }
                 }
                 ));
             }
         }
         else
         {
             if (args.Package.Code == ResponseCodes.BendStretchData)
             {
                 this.Dispatcher.Invoke(new Action(() =>
                 {
                     eilelc21.loginRun(args.Package.BendStretchAngle - (LumbarRobotController.RobotController.HomingAngle - LumbarRobotController.RobotController.PushRodAngle));
                     if (LumbarRobotController.RobotController.IsReady)
                     {
                         if (LumbarRobotController.RobotController.IsDrawLine())
                         {
                             sinWpf1.DrawRunLine(args.Package.BendStretchAngle - (LumbarRobotController.RobotController.HomingAngle - LumbarRobotController.RobotController.PushRodAngle));
                         }
                     }
                 }
                 ));
             }
         }
     }
 }