private void timer_Hole_Tick(object sender, EventArgs e) { label1.Text = "第" + (robot1.KeyPoint.Count + 1).ToString() + "个关键点(共6个):"; label2.Text = "第" + (robot1.HoleKeyPoint.Count + 1).ToString() + "个孔板关键点(4个角):"; int test1 = robot1.StepWork.Count; bool test2 = robot1.HolePointFinished; bool test3 = robot1.KeyPointFinished; int test4 = robot1.KeyPoint.Count; int test5 = robot1.HolePoint.Count; int test6 = robot1.HoleKeyPoint.Count; bool test7 = robot1.HoleKeyPointFinished; bool test8 = button3.Enabled; bool test9 = userControl11.Checks[0, 0]; if (userControl11.Enabled)//如果已经就绪 { robot1.HoleChoose = (bool[, ])userControl11.Checks.Clone(); } else if (!userControl11.Enabled && (!robot1.KeyPointFinished || !robot1.HoleKeyPointFinished))//如果关键点还没添加完成 { for (int k = 0; k < 8; k++) { for (int w = 0; w < 12; w++) { userControl11.Checks[k, w] = false; } } if (robot1.HoleKeyPoint.Count == 0) { userControl11.Checks[0, 0] = true; } else if (robot1.HoleKeyPoint.Count == 1) { userControl11.Checks[7, 0] = true; } else if (robot1.HoleKeyPoint.Count == 2) { userControl11.Checks[0, 11] = true; } else if (robot1.HoleKeyPoint.Count == 3) { userControl11.Checks[7, 11] = true; } } else//添加完成以后 { int i = 0; int j = 0; robot1.Trans1DTo2D(ref i, ref j, robot1.TransStepToHoleStep(robot1.Step)); userControl11.i_Coordinate = i; userControl11.j_Coordinate = j; } }