/// <summary> /// 删除一个关键点 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button4_Click(object sender, EventArgs e) { if (robot1.KeyPoint.Count < 6) { if (robot1.KeyPoint.Count == 0) { //如果集合为空,则不操作 } else { robot1.DeleteKeyPoint(); } } else { robot1.DeleteKeyPoint(); button6.Enabled = true; } }