/// <summary> /// x正向运动按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button_to_posx_Click(object sender, EventArgs e) { double time = decimal.ToDouble(numericUpDown_time.Value); int n = decimal.ToInt32(numericUpDown_addnum.Value); double distance = decimal.ToDouble(numericUpDown_distance.Value); double[] vn = new double[3] { distance, 0, 0 }; robot1.Move(vn, n, time); }