/// <summary> /// 窗口数据变化 /// </summary> void WindosShowData() { int temp = 0; double temd = 0; int axis = S2data.Axis; if (axis == 0) { tbXLoca.Text = S2data.GetLocation(axis).ToString(); } else if (axis == 1) { tbYLoca.Text = S2data.GetLocation(axis).ToString(); } else { tbZLoca.Text = S2data.GetLocation(axis).ToString(); } if (axis == 0) { temp = Convert.ToInt32(tbXDist.Text); } else if (axis == 1) { temp = Convert.ToInt32(tbYDist.Text); } else if (axis == 2) { temp = Convert.ToInt32(tbZDist.Text); } S2data.SetDistence(axis, temp); if (axis == 0) { temp = Convert.ToInt32(tbXTarg.Text); } else if (axis == 1) { temp = Convert.ToInt32(tbYTarg.Text); } else if (axis == 2) { temp = Convert.ToInt32(tbZTarg.Text); } S2data.SetTargloca(axis, temp); if (axis == 0) { temp = Convert.ToInt32(tbXSpdstart.Text); } else if (axis == 1) { temp = Convert.ToInt32(tbYSpdstart.Text); } else if (axis == 2) { temp = Convert.ToInt32(tbZSpdstart.Text); } S2data.SetStartSpd(axis, temp); if (axis == 0) { temp = Convert.ToInt32(tbXSpdrun.Text); } else if (axis == 1) { temp = Convert.ToInt32(tbYSpdrun.Text); } else if (axis == 2) { temp = Convert.ToInt32(tbZSpdrun.Text); } S2data.SetRunSpd(axis, temp); if (axis == 0) { temp = Convert.ToInt32(tbXSpdsec.Text); } else if (axis == 1) { temp = Convert.ToInt32(tbYSpdsec.Text); } else if (axis == 2) { temp = Convert.ToInt32(tbZSpdsec.Text); } S2data.SetSecSpd(axis, temp); if (axis == 0) { temd = double.Parse(tbXAss.Text); } else if (axis == 1) { temd = double.Parse(tbYAss.Text); } else if (axis == 2) { temd = double.Parse(tbZAss.Text); } S2data.SetAcce(axis, temd); S2data.SetRunMode(0, cbXMode.SelectedIndex); S2data.SetRunMode(1, cbYMode.SelectedIndex); S2data.SetRunMode(2, cbZMode.SelectedIndex); }