private void LocalUpdateForm_Load(object sender, EventArgs e) { //强制设置通讯端口 while (loadFile() == -1) { DeviceSetupForm f = new DeviceSetupForm(); f.ShowDialog(); } }
//硬件函数菜单 private void 设置硬件参数ToolStripMenuItem_Click(object sender, EventArgs e) { DeviceSetupForm form2 = new DeviceSetupForm(); form2.ShowDialog(); loadFile(); try { sender1.initSerialPort(paramList[0], "115200", "none", "8", "1", paramList[1]); } catch (Exception es) { } }