소스 검색

称重调试异常处理

Hcsy 8 년 전
부모
커밋
00d4557007
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      UAS-MES/FunctionCode/SystemSetting/SystemSetting_ScaleTest.cs

+ 10 - 0
UAS-MES/FunctionCode/SystemSetting/SystemSetting_ScaleTest.cs

@@ -39,6 +39,16 @@ namespace UAS_MES.SystemSetting
 
         private void StartTest_Click(object sender, EventArgs e)
         {
+            if (this.ComList.Text == "")
+            {
+                MessageBox.Show("端口号不可为空");
+                return;
+            }
+            if (this.BaudRate.Text == "")
+            {
+                MessageBox.Show("波特率不可为空");
+                return;
+            }
             thread = new Thread(GetSerialData);
             try
             {