/// <summary> /// 关闭端口 /// </summary> public void ClosePort() { try { CVRSDK.CVR_CloseComm(); } catch (Exception ex) { throw new Exception(ex.ToString()); } }
private void button2_Click(object sender, EventArgs e) { isread = false; try { CVRSDK.CVR_CloseComm(); } catch { } }
private void btnExit_Click(object sender, EventArgs e) { try { CVRSDK.CVR_CloseComm(); } catch { } Application.ExitThread(); }