private void button2_Click(object sender, EventArgs e) { myClient.SendStartReal(); trackBar1.Value = 0; trackBar2.Value = 0; trackBar3.Value = 0; trackBar4.Value = 0; trackBar5.Value = 0; trackBar6.Value = 0; trackBar7.Value = 0; trackBar8.Value = 0; trackBar9.Value = 0; trackBar10.Value = 0; _RobotBigger.theta[0] = (270 + trackBar1.Value) * Constants.TORAD; textBox1.Text = (_RobotBigger.theta[0] * Constants.TODEG - 180).ToString(); textBox1.Refresh(); _RobotBigger.theta[1] = (90 + trackBar2.Value) * Constants.TORAD; textBox2.Text = (_RobotBigger.theta[1] * Constants.TODEG - 90).ToString(); textBox2.Refresh(); _RobotBigger.theta[2] = (180 + trackBar3.Value) * Constants.TORAD; textBox3.Text = (_RobotBigger.theta[2] * Constants.TODEG - 90).ToString(); textBox3.Refresh(); _RobotBigger.theta[3] = (0 + trackBar4.Value) * Constants.TORAD; textBox4.Text = (_RobotBigger.theta[3] * Constants.TODEG).ToString(); textBox4.Refresh(); _RobotBigger.theta[4] = trackBar5.Value * Constants.TORAD; textBox5.Text = (_RobotBigger.theta[4] * Constants.TODEG).ToString(); textBox5.Refresh(); _RobotSmaller.theta[0] = (270 + trackBar6.Value) * Constants.TORAD; textBox6.Text = (_RobotSmaller.theta[0] * Constants.TODEG - 180).ToString(); textBox6.Refresh(); _RobotSmaller.theta[1] = (90 + trackBar7.Value) * Constants.TORAD; textBox7.Text = (_RobotSmaller.theta[1] * Constants.TODEG - 90).ToString(); textBox7.Refresh(); _RobotSmaller.theta[2] = (180 + trackBar8.Value) * Constants.TORAD; textBox8.Text = (_RobotSmaller.theta[2] * Constants.TODEG - 90).ToString(); textBox8.Refresh(); _RobotSmaller.theta[3] = (0 + trackBar9.Value) * Constants.TORAD; textBox9.Text = (_RobotSmaller.theta[3] * Constants.TODEG).ToString(); textBox9.Refresh(); _RobotSmaller.theta[4] = trackBar10.Value * Constants.TORAD; textBox10.Text = (_RobotSmaller.theta[4] * Constants.TODEG).ToString(); textBox10.Refresh(); myCollisionDetector.DrawArms(_RobotSmaller, _RobotBigger); }