private void MoveAGV()
{
double rad = ((Angle + 90) * Math.PI) / 180;
int Offset = 0;
int Inc = -4;
Offset += Inc;
int IncX = Convert.ToInt32(Offset * Math.Cos(rad));
int IncY = Convert.ToInt32(Offset * Math.Sin(rad));
// Leaving the track
if (cbTrajeto.Checked)
{
Graphics g = Graphics.FromImage(OriginalMap);
Point p1 = new Point(pbRobot.Left - pbTerrain.Left + pbRobot.Width / 2, pbRobot.Top - pbTerrain.Top + pbRobot.Height / 2);
Point p2 = new Point(p1.X + IncX, p1.Y + IncY);
g.DrawLine(new Pen(new SolidBrush(Color.Blue)), p1, p2);
g.DrawImage(OriginalMap, 0, 0);
g.Dispose();
}
pbRobot.Top = pbRobot.Top + IncY;
pbRobot.Left = pbRobot.Left + IncX;
}