private void viewControl_MouseDown(object sender, MouseEventArgs e) { switch (MouseDownMode) { case "Bspline绘制": if (DrawPointFlag == "未填入") { MessageBox.Show("请输入姿态(单位:度)", "注意", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { //记录鼠标点击时的像素点坐标 MouseDownPixelPoint.X = e.X; MouseDownPixelPoint.Y = e.Y; MouseDownRealPoint = ViewControl.GetRealAxes(e.X, e.Y); } break; case "": //记录鼠标点击时的像素点坐标 MouseDownPixelPoint.X = e.X; MouseDownPixelPoint.Y = e.Y; MouseDownRealPoint = ViewControl.GetRealAxes(e.X, e.Y); break; } }