/// <summary> /// 设置工差按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SetTolBtn_Click(object sender, EventArgs e) { try { SetTolForm setTolForm = new SetTolForm(); setTolForm.ShowDialog(); if (setTolForm.DialogResult == DialogResult.OK) { topTol = Convert.ToDouble(setTolForm.TopTol); botTol = Convert.ToDouble(setTolForm.BotTol); SetTolToForm(); } } catch (Exception) { MsgBoxHelper.ErrorMsgBox("程序错误", "错误"); } }