Эх сурвалжийг харах

优化调整气密性 吞吐量

yhluo 1 сар өмнө
parent
commit
d1c69939cd

+ 54 - 72
UAS_MES_HYSX/FunctionCode/Make/Make_AirTightnessTest.cs

@@ -1,4 +1,5 @@
 using DevExpress.Utils.Drawing.Helpers;
+using NPOI.SS.Formula.Functions;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -13,8 +14,6 @@ using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
-using static System.Windows.Forms.VisualStyles.VisualStyleElement.ListView;
-using static UAS_MES_NEW.Make.Make_ParseLog;
 
 namespace UAS_MES_NEW.Make
 {
@@ -33,6 +32,8 @@ namespace UAS_MES_NEW.Make
         string oWO, oWOId, oErrMsg = "";
         string mTestVal;
 
+        SerialPort serialPort = new SerialPort();
+
         private void Make_AirTightnessTest_Load(object sender, EventArgs e)
         {
             dh = SystemInf.dh;
@@ -48,6 +49,12 @@ namespace UAS_MES_NEW.Make
                 Port.Items.Add(ports[i]);
             }
 
+            serialPort.Parity = Parity.Even;
+            serialPort.StopBits = StopBits.One;
+            serialPort.DataBits = 8;
+            serialPort.Encoding = Encoding.ASCII;
+            serialPort.DataReceived += Serial_DataReceived;
+
             AutoTest.Checked = true;
         }
 
@@ -55,18 +62,14 @@ namespace UAS_MES_NEW.Make
         {
             if (Port.SelectedIndex == -1) return;
 
-            using (SerialPort serialPort = new SerialPort(Port.Text))
+            using (SerialPort QuerySerialPort = new SerialPort(Port.Text))
             {
                 try
                 {
-                    serialPort.ReadTimeout = 800;
-                    serialPort.WriteTimeout = 800;
-
                     BaudRate.SelectedIndex = -1;
-                    serialPort.Open();
-                    Thread.Sleep(200);
+                    QuerySerialPort.Open();
 
-                    int baudRate = serialPort.BaudRate;
+                    int baudRate = QuerySerialPort.BaudRate;
                     foreach (var item in BaudRate.Items)
                     {
                         if (item.ToString().Contains($"{baudRate}"))
@@ -88,6 +91,7 @@ namespace UAS_MES_NEW.Make
                     }
                 }
             }
+            serialPort.PortName = Port.Text;
         }
 
         private void FirstSN_KeyDown(object sender, KeyEventArgs e)
@@ -117,25 +121,10 @@ namespace UAS_MES_NEW.Make
                 Thread thread = new Thread(() =>
                 {
                     bool success = false;
-                    ShowMsg(1, "已发送指令,请稍等测试结果");
-                    success = SendCom(mTestVal);
-                    this.BeginInvoke(new Action(() =>
+                    if (SendCom(mTestVal))
                     {
-                        if (success)
-                        {
-                            LoadTestDetail("L", out string testRes);
-                            if (testRes == "NG")
-                            {
-                                RTxt8.Focus();
-                                RTxt8.SelectAll();
-                            }
-                            CheckPassStation(FirstSN.Text, testRes);
-                        }
-                        else
-                        {
-                            LoadTestDetail("C", out string msg);
-                        }
-                    }));
+                        ShowMsg(1, "已发送指令,请稍等测试结果");
+                    }
                 });
                 thread.IsBackground = true;
                 thread.Start();
@@ -172,25 +161,10 @@ namespace UAS_MES_NEW.Make
                 Thread thread = new Thread(() =>
                 {
                     bool success = false;
-                    ShowMsg(1, "已发送指令,请稍等测试结果");
-                    success = SendCom(mTestVal);
-                    this.BeginInvoke(new Action(() =>
+                    if (SendCom(mTestVal))
                     {
-                        if (success)
-                        {
-                            LoadTestDetail("L", out string testRes);
-                            if (testRes == "NG")
-                            {
-                                RTxt8.Focus();
-                                RTxt8.SelectAll();
-                            }
-                            CheckPassStation(SecondSN.Text, testRes);
-                        }
-                        else
-                        {
-                            LoadTestDetail("C", out string msg);
-                        }
-                    }));
+                        ShowMsg(1, "已发送指令,请稍等测试结果");
+                    }
                 });
                 thread.IsBackground = true;
                 thread.Start();
@@ -202,37 +176,44 @@ namespace UAS_MES_NEW.Make
 
         private bool SendCom(string workStation)
         {
-            using (SerialPort serialPort = new SerialPort(Port.Text))
+            try
             {
-                try
-                {
-                    serialPort.BaudRate = Convert.ToInt32(BaudRate.Text);
-                    serialPort.Parity = Parity.Even;
-                    serialPort.StopBits = StopBits.One;
-                    serialPort.DataBits = 8;
-                    serialPort.Encoding = Encoding.ASCII;
-                    serialPort.ReadTimeout = 20000;
-
-                    if (!serialPort.IsOpen) serialPort.Open();
-
-                    serialPort.WriteLine(workStation);
-
-                    Result.Text = serialPort.ReadLine().Trim();
+                serialPort.BaudRate = Convert.ToInt32(BaudRate.Text);
+                if (!serialPort.IsOpen) serialPort.Open();
+                serialPort.WriteLine(workStation);
+                return true;
+            }
+            catch (Exception ex)
+            {
+                ShowMsg(0, $"获取气密性结果NG,{ex.Message}");
+                return true;
+            }
+        }
+        private void Serial_DataReceived(object sender, SerialDataReceivedEventArgs e)
+        {
+            try
+            {
+                SerialPort sp = (SerialPort)sender;
+                Result.Text = sp.ReadExisting();
 
-                    return true;
-                }
-                catch (Exception ex)
+                LoadTestDetail("L", out string testRes);
+                if (testRes == "NG")
                 {
-                    Result.Text = "/20251014_142742/0K/2#/NULL/30/99/0/12700/0/N/0K";
-                    ShowMsg(0, $"获取气密性结果NG,{ex.Message}");
-                    return true;
+                    RTxt8.Focus();
+                    RTxt8.SelectAll();
                 }
-                finally
+                if(mTestVal == "LWS1")  CheckPassStation(FirstSN.Text, testRes);
+                else if(mTestVal == "LWS2") CheckPassStation(SecondSN.Text, testRes);
+            }
+            catch (Exception ex)
+            {
+                ShowMsg(0, $"数据接收错误: {ex.Message}");
+            }
+            finally
+            {
+                if (serialPort.IsOpen)
                 {
-                    if (serialPort.IsOpen)
-                    {
-                        serialPort.Close();
-                    }
+                    serialPort.Close();
                 }
             }
         }
@@ -260,6 +241,8 @@ namespace UAS_MES_NEW.Make
                     {
                         ShowMsg(1, $"序列号{sn}采集成功:测试结果为{res}");
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oWO, User.UserLineCode, User.UserSourceCode, "气密性测试", "气密性测试过站成功", sn, "");
+
+                        //LoadTestDetail("C", out string testRes);
                     }
                 }
                 else
@@ -270,7 +253,6 @@ namespace UAS_MES_NEW.Make
             else
             {
                 UpdateSN("C", sn);
-                LoadTestDetail("C", out string testRes);
                 ShowMsg(0, $"序列号{sn},过站核对NG:{oErrMsg}");
             }
         }

+ 10 - 19
UAS_MES_HYSX/FunctionCode/Make/Make_ParseLog.cs

@@ -99,6 +99,8 @@ namespace UAS_MES_NEW.Make
             if (Device.SelectedIndex == -1) return;
 
             if(ChangeWoTimer.Enabled)   ChangeWoTimer.Stop();
+            onWatch.Enabled = true;
+
             switch (Device.SelectedIndex)
             {
                 case 0:
@@ -108,8 +110,9 @@ namespace UAS_MES_NEW.Make
                     ChangeWoFunc(null, null);*/
                     break;
                 case 1:
-                    currFileType = "jpg";
+                    currFileType = "bmp";
                     equiType = "Xray";
+                    onWatch.Enabled = false;
                     break;
                 case 2:
                     currFileType = "jpg";
@@ -163,12 +166,6 @@ namespace UAS_MES_NEW.Make
             string[] txtFiles;
             if (equiType == "Xray")
             {
-                if (string.IsNullOrEmpty(ma_code.Text))
-                {
-                    MessageBox.Show(this.ParentForm, "请选择工单", "提示");
-                    return;
-                }
-
                 txtFiles = Directory.GetDirectories(txtPath.Text);
                 if (txtFiles.Length == 0)
                 {
@@ -204,14 +201,6 @@ namespace UAS_MES_NEW.Make
                 MessageBox.Show(this.ParentForm, "请选择解析路径", "提示");
                 return;
             }
-            if (equiType == "Xray")
-            {
-                if (string.IsNullOrEmpty(ma_code.Text))
-                {
-                    MessageBox.Show(this.ParentForm, "请选择工单", "提示");
-                    return;
-                }
-            }
             try
             {
                 watcher.Path = txtPath.Text;
@@ -373,11 +362,15 @@ namespace UAS_MES_NEW.Make
                         string[] floderFile = Directory.GetFiles(file, $"*.{currFileType}");
                         foreach(string floderFileItem in floderFile)
                         {
-                            SN = Path.GetFileName(floderFileItem).Split('-')[0];
+                            SN = Path.GetFileName(floderFileItem).Split('_')[1];
                             if (UploadImageToFtp(floderFileItem, SN))
                             {
+                                if (!LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, SN, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
+                                {
+                                    LogMessage(0, $"核对NG:{oErrorMessage}");
+                                }
                                 dh.ExecuteSql($@"INSERT INTO steptestmain (sm_id, sm_sn,sm_makecode,sm_stepcode,sm_indate,sm_machinecode,sm_result) 
-                                    VALUES ( steptestmain_seq.NEXTVAL,'{SN}','{ma_code.Text}','{User.UserSourceCode}', sysdate,'Xray', 'http://192.168.1.5:8088/ftp/xray/{DateTime.Now.ToString("yyyyMMdd")}/{Path.GetFileName(floderFileItem)}' )", "insert");
+                                    VALUES ( steptestmain_seq.NEXTVAL,'{SN}','{omakeCode}','{User.UserSourceCode}', sysdate,'Xray', 'http://192.168.1.5:8099/ftp/xray/{DateTime.Now.ToString("yyyyMMdd")}/{Path.GetFileName(floderFileItem)}' )", "insert");
 
                                 if (Array.IndexOf(floderFile, floderFileItem) == floderFile.Length - 1)
                                 {
@@ -594,8 +587,6 @@ namespace UAS_MES_NEW.Make
         public bool UploadImageToFtp(string localFilePath, string Sn)
         {
             string ftpServer;
-            //string ftpServer = "ftp://10.8.0.215:21/xray/";
-            //string ftpServer = "ftp://192.168.1.5:21/xray/";
 
             ftpServer = equiType == "Xray" ? "ftp://10.8.0.215:21/xray/" : "ftp://10.8.0.215:21/ccd/";
             ftpServer = equiType == "Xray" ? "ftp://192.168.1.5:21/xray/" : "ftp://192.168.1.5:21/ccd/";

+ 683 - 0
UAS_MES_HYSX/FunctionCode/Make/Make_WirelessThroughput.Designer.cs

@@ -28,20 +28,703 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.SNDetails = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+            this.productName = new System.Windows.Forms.Label();
+            this.productCode = new System.Windows.Forms.Label();
+            this.workOrder = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.serialNumber = new System.Windows.Forms.Label();
+            this.ProtDetails = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.IPList = new System.Windows.Forms.TextBox();
+            this.label18 = new System.Windows.Forms.Label();
+            this.Locat3 = new System.Windows.Forms.CheckBox();
+            this.Locat2 = new System.Windows.Forms.CheckBox();
+            this.Locat1 = new System.Windows.Forms.CheckBox();
+            this.Radio2 = new System.Windows.Forms.CheckBox();
+            this.Radio1 = new System.Windows.Forms.CheckBox();
+            this.Account = new System.Windows.Forms.TextBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.SN = new System.Windows.Forms.TextBox();
+            this.TestTime = new System.Windows.Forms.TextBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label9 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.Start = new System.Windows.Forms.Button();
+            this.label8 = new System.Windows.Forms.Label();
+            this.Password = new System.Windows.Forms.TextBox();
+            this.panel2 = new System.Windows.Forms.Panel();
+            this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
+            this.DownMax = new System.Windows.Forms.TextBox();
+            this.DownMin = new System.Windows.Forms.TextBox();
+            this.UpMax = new System.Windows.Forms.TextBox();
+            this.ResMin = new System.Windows.Forms.Label();
+            this.label17 = new System.Windows.Forms.Label();
+            this.ResMax = new System.Windows.Forms.Label();
+            this.label16 = new System.Windows.Forms.Label();
+            this.label14 = new System.Windows.Forms.Label();
+            this.label13 = new System.Windows.Forms.Label();
+            this.label12 = new System.Windows.Forms.Label();
+            this.UpMin = new System.Windows.Forms.TextBox();
+            this.label15 = new System.Windows.Forms.Label();
+            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.label11 = new System.Windows.Forms.Label();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.ProductList = new System.Windows.Forms.TextBox();
+            this.SNDetails.SuspendLayout();
+            this.tableLayoutPanel1.SuspendLayout();
+            this.ProtDetails.SuspendLayout();
+            this.tableLayoutPanel2.SuspendLayout();
+            this.panel1.SuspendLayout();
+            this.panel2.SuspendLayout();
+            this.tableLayoutPanel3.SuspendLayout();
             this.SuspendLayout();
             // 
+            // SNDetails
+            // 
+            this.SNDetails.BorderColor = System.Drawing.Color.Black;
+            this.SNDetails.Controls.Add(this.tableLayoutPanel1);
+            this.SNDetails.Dock = System.Windows.Forms.DockStyle.Top;
+            this.SNDetails.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.SNDetails.Location = new System.Drawing.Point(0, 0);
+            this.SNDetails.Name = "SNDetails";
+            this.SNDetails.Size = new System.Drawing.Size(1366, 123);
+            this.SNDetails.TabIndex = 2;
+            this.SNDetails.TabStop = false;
+            this.SNDetails.Text = "产品序列信息";
+            this.SNDetails.TextColor = System.Drawing.Color.Black;
+            // 
+            // tableLayoutPanel1
+            // 
+            this.tableLayoutPanel1.ColumnCount = 8;
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.451613F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.09677F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.451613F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.09677F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.451613F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 13.19F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.451613F));
+            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 36.81F));
+            this.tableLayoutPanel1.Controls.Add(this.productName, 7, 0);
+            this.tableLayoutPanel1.Controls.Add(this.productCode, 5, 0);
+            this.tableLayoutPanel1.Controls.Add(this.workOrder, 3, 0);
+            this.tableLayoutPanel1.Controls.Add(this.label4, 6, 0);
+            this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
+            this.tableLayoutPanel1.Controls.Add(this.label3, 4, 0);
+            this.tableLayoutPanel1.Controls.Add(this.label2, 2, 0);
+            this.tableLayoutPanel1.Controls.Add(this.serialNumber, 1, 0);
+            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 37);
+            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+            this.tableLayoutPanel1.RowCount = 1;
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 83F));
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(1360, 83);
+            this.tableLayoutPanel1.TabIndex = 0;
+            // 
+            // productName
+            // 
+            this.productName.AutoSize = true;
+            this.productName.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.productName.Location = new System.Drawing.Point(858, 0);
+            this.productName.Name = "productName";
+            this.productName.Size = new System.Drawing.Size(499, 83);
+            this.productName.TabIndex = 7;
+            this.productName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // productCode
+            // 
+            this.productCode.AutoSize = true;
+            this.productCode.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.productCode.Location = new System.Drawing.Point(592, 0);
+            this.productCode.Name = "productCode";
+            this.productCode.Size = new System.Drawing.Size(173, 83);
+            this.productCode.TabIndex = 6;
+            this.productCode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // workOrder
+            // 
+            this.workOrder.AutoSize = true;
+            this.workOrder.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.workOrder.Location = new System.Drawing.Point(341, 0);
+            this.workOrder.Name = "workOrder";
+            this.workOrder.Size = new System.Drawing.Size(158, 83);
+            this.workOrder.TabIndex = 5;
+            this.workOrder.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.label4.Location = new System.Drawing.Point(771, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(81, 83);
+            this.label4.TabIndex = 3;
+            this.label4.Text = "产品名称: ";
+            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.label1.Location = new System.Drawing.Point(3, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(81, 83);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "序列号: ";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.label3.Location = new System.Drawing.Point(505, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(81, 83);
+            this.label3.TabIndex = 2;
+            this.label3.Text = "产品编号: ";
+            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.label2.Location = new System.Drawing.Point(254, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(81, 83);
+            this.label2.TabIndex = 1;
+            this.label2.Text = "工单: ";
+            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // serialNumber
+            // 
+            this.serialNumber.AutoSize = true;
+            this.serialNumber.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.serialNumber.Location = new System.Drawing.Point(90, 0);
+            this.serialNumber.Name = "serialNumber";
+            this.serialNumber.Size = new System.Drawing.Size(158, 83);
+            this.serialNumber.TabIndex = 4;
+            this.serialNumber.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // ProtDetails
+            // 
+            this.ProtDetails.BorderColor = System.Drawing.Color.Black;
+            this.ProtDetails.Controls.Add(this.tableLayoutPanel2);
+            this.ProtDetails.Dock = System.Windows.Forms.DockStyle.Top;
+            this.ProtDetails.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ProtDetails.Location = new System.Drawing.Point(0, 123);
+            this.ProtDetails.Name = "ProtDetails";
+            this.ProtDetails.Size = new System.Drawing.Size(1366, 333);
+            this.ProtDetails.TabIndex = 3;
+            this.ProtDetails.TabStop = false;
+            this.ProtDetails.Text = "测试设置";
+            this.ProtDetails.TextColor = System.Drawing.Color.Black;
+            // 
+            // tableLayoutPanel2
+            // 
+            this.tableLayoutPanel2.ColumnCount = 2;
+            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60F));
+            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
+            this.tableLayoutPanel2.Controls.Add(this.panel1, 0, 0);
+            this.tableLayoutPanel2.Controls.Add(this.panel2, 1, 0);
+            this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 35);
+            this.tableLayoutPanel2.Name = "tableLayoutPanel2";
+            this.tableLayoutPanel2.RowCount = 1;
+            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+            this.tableLayoutPanel2.Size = new System.Drawing.Size(1360, 295);
+            this.tableLayoutPanel2.TabIndex = 12;
+            // 
+            // panel1
+            // 
+            this.panel1.Controls.Add(this.ProductList);
+            this.panel1.Controls.Add(this.IPList);
+            this.panel1.Controls.Add(this.label18);
+            this.panel1.Controls.Add(this.Locat3);
+            this.panel1.Controls.Add(this.Locat2);
+            this.panel1.Controls.Add(this.Locat1);
+            this.panel1.Controls.Add(this.Radio2);
+            this.panel1.Controls.Add(this.Radio1);
+            this.panel1.Controls.Add(this.Account);
+            this.panel1.Controls.Add(this.label5);
+            this.panel1.Controls.Add(this.label10);
+            this.panel1.Controls.Add(this.SN);
+            this.panel1.Controls.Add(this.TestTime);
+            this.panel1.Controls.Add(this.label6);
+            this.panel1.Controls.Add(this.label9);
+            this.panel1.Controls.Add(this.label7);
+            this.panel1.Controls.Add(this.Start);
+            this.panel1.Controls.Add(this.label8);
+            this.panel1.Controls.Add(this.Password);
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panel1.Location = new System.Drawing.Point(3, 3);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(810, 289);
+            this.panel1.TabIndex = 12;
+            // 
+            // IPList
+            // 
+            this.IPList.Location = new System.Drawing.Point(152, 14);
+            this.IPList.Name = "IPList";
+            this.IPList.Size = new System.Drawing.Size(293, 39);
+            this.IPList.TabIndex = 19;
+            // 
+            // label18
+            // 
+            this.label18.AutoSize = true;
+            this.label18.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label18.Location = new System.Drawing.Point(14, 71);
+            this.label18.Name = "label18";
+            this.label18.Size = new System.Drawing.Size(126, 28);
+            this.label18.TabIndex = 17;
+            this.label18.Text = "产品 IP地址:";
+            // 
+            // Locat3
+            // 
+            this.Locat3.AutoSize = true;
+            this.Locat3.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Locat3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Locat3.Location = new System.Drawing.Point(899, 16);
+            this.Locat3.Name = "Locat3";
+            this.Locat3.Size = new System.Drawing.Size(187, 32);
+            this.Locat3.TabIndex = 16;
+            this.Locat3.Text = "安居云固件TF卡";
+            this.Locat3.UseVisualStyleBackColor = true;
+            this.Locat3.Click += new System.EventHandler(this.Locat3_Click);
+            // 
+            // Locat2
+            // 
+            this.Locat2.AutoSize = true;
+            this.Locat2.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Locat2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Locat2.Location = new System.Drawing.Point(714, 16);
+            this.Locat2.Name = "Locat2";
+            this.Locat2.Size = new System.Drawing.Size(166, 32);
+            this.Locat2.TabIndex = 15;
+            this.Locat2.Text = "中心固件TF卡";
+            this.Locat2.UseVisualStyleBackColor = true;
+            this.Locat2.Click += new System.EventHandler(this.Locat2_Click);
+            // 
+            // Locat1
+            // 
+            this.Locat1.AutoSize = true;
+            this.Locat1.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Locat1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Locat1.Location = new System.Drawing.Point(562, 17);
+            this.Locat1.Name = "Locat1";
+            this.Locat1.Size = new System.Drawing.Size(122, 32);
+            this.Locat1.TabIndex = 14;
+            this.Locat1.Text = "系统内置";
+            this.Locat1.UseVisualStyleBackColor = true;
+            this.Locat1.Click += new System.EventHandler(this.Locat1_Click);
+            // 
+            // Radio2
+            // 
+            this.Radio2.AutoSize = true;
+            this.Radio2.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Radio2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Radio2.Location = new System.Drawing.Point(719, 133);
+            this.Radio2.Name = "Radio2";
+            this.Radio2.Size = new System.Drawing.Size(108, 32);
+            this.Radio2.TabIndex = 13;
+            this.Radio2.Text = "测试5G";
+            this.Radio2.UseVisualStyleBackColor = true;
+            this.Radio2.Click += new System.EventHandler(this.Radio2_Click);
+            // 
+            // Radio1
+            // 
+            this.Radio1.AutoSize = true;
+            this.Radio1.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Radio1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Radio1.Location = new System.Drawing.Point(562, 133);
+            this.Radio1.Name = "Radio1";
+            this.Radio1.Size = new System.Drawing.Size(125, 32);
+            this.Radio1.TabIndex = 12;
+            this.Radio1.Text = "测试2.4G";
+            this.Radio1.UseVisualStyleBackColor = true;
+            this.Radio1.Click += new System.EventHandler(this.Radio1_Click);
+            // 
+            // Account
+            // 
+            this.Account.Location = new System.Drawing.Point(151, 117);
+            this.Account.Name = "Account";
+            this.Account.Size = new System.Drawing.Size(293, 39);
+            this.Account.TabIndex = 5;
+            this.Account.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Account_KeyDown);
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(14, 236);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(80, 28);
+            this.label5.TabIndex = 0;
+            this.label5.Text = "序列号:";
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(749, 77);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(103, 28);
+            this.label10.TabIndex = 10;
+            this.label10.Text = "秒(<=30)";
+            // 
+            // SN
+            // 
+            this.SN.Location = new System.Drawing.Point(151, 236);
+            this.SN.Name = "SN";
+            this.SN.Size = new System.Drawing.Size(384, 39);
+            this.SN.TabIndex = 1;
+            this.SN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN_KeyDown);
+            // 
+            // TestTime
+            // 
+            this.TestTime.Location = new System.Drawing.Point(680, 71);
+            this.TestTime.Name = "TestTime";
+            this.TestTime.Size = new System.Drawing.Size(63, 39);
+            this.TestTime.TabIndex = 9;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(14, 20);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(153, 28);
+            this.label6.TabIndex = 2;
+            this.label6.Text = "iperf 服务地址:";
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(568, 77);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(101, 28);
+            this.label9.TabIndex = 8;
+            this.label9.Text = "测试时长:";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(14, 120);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(101, 28);
+            this.label7.TabIndex = 3;
+            this.label7.Text = "登录账户:";
+            // 
+            // Start
+            // 
+            this.Start.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.Start.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Start.Location = new System.Drawing.Point(573, 228);
+            this.Start.Name = "Start";
+            this.Start.Size = new System.Drawing.Size(140, 47);
+            this.Start.TabIndex = 7;
+            this.Start.Text = "开始测试";
+            this.Start.UseVisualStyleBackColor = true;
+            this.Start.Click += new System.EventHandler(this.Start_Click);
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(14, 174);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(101, 28);
+            this.label8.TabIndex = 4;
+            this.label8.Text = "登录密码:";
+            // 
+            // Password
+            // 
+            this.Password.Location = new System.Drawing.Point(151, 171);
+            this.Password.Name = "Password";
+            this.Password.Size = new System.Drawing.Size(293, 39);
+            this.Password.TabIndex = 6;
+            this.Password.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Password_KeyDown);
+            // 
+            // panel2
+            // 
+            this.panel2.Controls.Add(this.tableLayoutPanel3);
+            this.panel2.Controls.Add(this.textBox1);
+            this.panel2.Controls.Add(this.label11);
+            this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panel2.Location = new System.Drawing.Point(819, 3);
+            this.panel2.Name = "panel2";
+            this.panel2.Size = new System.Drawing.Size(538, 289);
+            this.panel2.TabIndex = 13;
+            // 
+            // tableLayoutPanel3
+            // 
+            this.tableLayoutPanel3.ColumnCount = 4;
+            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+            this.tableLayoutPanel3.Controls.Add(this.DownMax, 2, 2);
+            this.tableLayoutPanel3.Controls.Add(this.DownMin, 1, 2);
+            this.tableLayoutPanel3.Controls.Add(this.UpMax, 2, 1);
+            this.tableLayoutPanel3.Controls.Add(this.ResMin, 3, 2);
+            this.tableLayoutPanel3.Controls.Add(this.label17, 0, 2);
+            this.tableLayoutPanel3.Controls.Add(this.ResMax, 3, 1);
+            this.tableLayoutPanel3.Controls.Add(this.label16, 0, 1);
+            this.tableLayoutPanel3.Controls.Add(this.label14, 2, 0);
+            this.tableLayoutPanel3.Controls.Add(this.label13, 1, 0);
+            this.tableLayoutPanel3.Controls.Add(this.label12, 0, 0);
+            this.tableLayoutPanel3.Controls.Add(this.UpMin, 1, 1);
+            this.tableLayoutPanel3.Controls.Add(this.label15, 3, 0);
+            this.tableLayoutPanel3.Location = new System.Drawing.Point(5, 60);
+            this.tableLayoutPanel3.Name = "tableLayoutPanel3";
+            this.tableLayoutPanel3.RowCount = 3;
+            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+            this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
+            this.tableLayoutPanel3.Size = new System.Drawing.Size(532, 159);
+            this.tableLayoutPanel3.TabIndex = 15;
+            // 
+            // DownMax
+            // 
+            this.DownMax.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.DownMax.Location = new System.Drawing.Point(269, 113);
+            this.DownMax.Name = "DownMax";
+            this.DownMax.Size = new System.Drawing.Size(100, 39);
+            this.DownMax.TabIndex = 15;
+            // 
+            // DownMin
+            // 
+            this.DownMin.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.DownMin.Location = new System.Drawing.Point(136, 113);
+            this.DownMin.Name = "DownMin";
+            this.DownMin.Size = new System.Drawing.Size(100, 39);
+            this.DownMin.TabIndex = 14;
+            // 
+            // UpMax
+            // 
+            this.UpMax.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.UpMax.Location = new System.Drawing.Point(269, 60);
+            this.UpMax.Name = "UpMax";
+            this.UpMax.Size = new System.Drawing.Size(100, 39);
+            this.UpMax.TabIndex = 13;
+            // 
+            // ResMin
+            // 
+            this.ResMin.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.ResMin.AutoSize = true;
+            this.ResMin.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ResMin.Location = new System.Drawing.Point(402, 118);
+            this.ResMin.Name = "ResMin";
+            this.ResMin.Size = new System.Drawing.Size(24, 28);
+            this.ResMin.TabIndex = 11;
+            this.ResMin.Text = "0";
+            // 
+            // label17
+            // 
+            this.label17.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label17.AutoSize = true;
+            this.label17.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label17.Location = new System.Drawing.Point(3, 118);
+            this.label17.Name = "label17";
+            this.label17.Size = new System.Drawing.Size(96, 28);
+            this.label17.TabIndex = 8;
+            this.label17.Text = "下行带宽";
+            // 
+            // ResMax
+            // 
+            this.ResMax.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.ResMax.AutoSize = true;
+            this.ResMax.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ResMax.Location = new System.Drawing.Point(402, 65);
+            this.ResMax.Name = "ResMax";
+            this.ResMax.Size = new System.Drawing.Size(24, 28);
+            this.ResMax.TabIndex = 7;
+            this.ResMax.Text = "0";
+            // 
+            // label16
+            // 
+            this.label16.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label16.AutoSize = true;
+            this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label16.Location = new System.Drawing.Point(3, 65);
+            this.label16.Name = "label16";
+            this.label16.Size = new System.Drawing.Size(96, 28);
+            this.label16.TabIndex = 4;
+            this.label16.Text = "上行带宽";
+            // 
+            // label14
+            // 
+            this.label14.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label14.AutoSize = true;
+            this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label14.Location = new System.Drawing.Point(269, 12);
+            this.label14.Name = "label14";
+            this.label14.Size = new System.Drawing.Size(54, 28);
+            this.label14.TabIndex = 2;
+            this.label14.Text = "上限";
+            // 
+            // label13
+            // 
+            this.label13.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label13.AutoSize = true;
+            this.label13.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label13.Location = new System.Drawing.Point(136, 12);
+            this.label13.Name = "label13";
+            this.label13.Size = new System.Drawing.Size(54, 28);
+            this.label13.TabIndex = 1;
+            this.label13.Text = "下限";
+            // 
+            // label12
+            // 
+            this.label12.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label12.AutoSize = true;
+            this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label12.Location = new System.Drawing.Point(3, 12);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(69, 28);
+            this.label12.TabIndex = 0;
+            this.label12.Text = "Mbps";
+            // 
+            // UpMin
+            // 
+            this.UpMin.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.UpMin.Location = new System.Drawing.Point(136, 60);
+            this.UpMin.Name = "UpMin";
+            this.UpMin.Size = new System.Drawing.Size(100, 39);
+            this.UpMin.TabIndex = 12;
+            // 
+            // label15
+            // 
+            this.label15.Anchor = System.Windows.Forms.AnchorStyles.Left;
+            this.label15.AutoSize = true;
+            this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label15.Location = new System.Drawing.Point(402, 12);
+            this.label15.Name = "label15";
+            this.label15.Size = new System.Drawing.Size(75, 28);
+            this.label15.TabIndex = 3;
+            this.label15.Text = "实际值";
+            // 
+            // textBox1
+            // 
+            this.textBox1.BackColor = System.Drawing.SystemColors.Control;
+            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.textBox1.Location = new System.Drawing.Point(148, 17);
+            this.textBox1.Name = "textBox1";
+            this.textBox1.Size = new System.Drawing.Size(109, 32);
+            this.textBox1.TabIndex = 14;
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Location = new System.Drawing.Point(4, 17);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(140, 31);
+            this.label11.TabIndex = 13;
+            this.label11.Text = "测试结果为:";
+            // 
+            // OperatResult
+            // 
+            this.OperatResult.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperatResult.Location = new System.Drawing.Point(0, 456);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(1366, 312);
+            this.OperatResult.TabIndex = 89;
+            this.OperatResult.Text = "";
+            // 
+            // ProductList
+            // 
+            this.ProductList.Location = new System.Drawing.Point(151, 65);
+            this.ProductList.Name = "ProductList";
+            this.ProductList.Size = new System.Drawing.Size(293, 39);
+            this.ProductList.TabIndex = 20;
+            // 
             // Make_WirelessThroughput
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1366, 768);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.ProtDetails);
+            this.Controls.Add(this.SNDetails);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "Make_WirelessThroughput";
             this.Text = "Make_WirelessThroughput";
+            this.Load += new System.EventHandler(this.Make_WirelessThroughput_Load);
+            this.SNDetails.ResumeLayout(false);
+            this.tableLayoutPanel1.ResumeLayout(false);
+            this.tableLayoutPanel1.PerformLayout();
+            this.ProtDetails.ResumeLayout(false);
+            this.tableLayoutPanel2.ResumeLayout(false);
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            this.panel2.ResumeLayout(false);
+            this.panel2.PerformLayout();
+            this.tableLayoutPanel3.ResumeLayout(false);
+            this.tableLayoutPanel3.PerformLayout();
             this.ResumeLayout(false);
 
         }
 
         #endregion
+
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder SNDetails;
+        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+        private System.Windows.Forms.Label productName;
+        private System.Windows.Forms.Label productCode;
+        private System.Windows.Forms.Label workOrder;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label serialNumber;
+        private CustomControl.GroupBoxWithBorder.GroupBoxWithBorder ProtDetails;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox SN;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.TextBox Password;
+        private System.Windows.Forms.TextBox Account;
+        private System.Windows.Forms.Button Start;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+        private System.Windows.Forms.TextBox TestTime;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label label11;
+        private System.Windows.Forms.Panel panel2;
+        private System.Windows.Forms.TextBox textBox1;
+        private System.Windows.Forms.CheckBox Radio1;
+        private System.Windows.Forms.CheckBox Radio2;
+        private System.Windows.Forms.CheckBox Locat3;
+        private System.Windows.Forms.CheckBox Locat2;
+        private System.Windows.Forms.CheckBox Locat1;
+        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
+        private System.Windows.Forms.Label label12;
+        private System.Windows.Forms.Label label15;
+        private System.Windows.Forms.Label label14;
+        private System.Windows.Forms.Label label13;
+        private System.Windows.Forms.Label ResMin;
+        private System.Windows.Forms.Label label17;
+        private System.Windows.Forms.Label ResMax;
+        private System.Windows.Forms.Label label16;
+        private System.Windows.Forms.TextBox UpMin;
+        private System.Windows.Forms.TextBox DownMax;
+        private System.Windows.Forms.TextBox DownMin;
+        private System.Windows.Forms.TextBox UpMax;
+        private System.Windows.Forms.Label label18;
+        private System.Windows.Forms.TextBox IPList;
+        private System.Windows.Forms.TextBox ProductList;
     }
 }

+ 449 - 1
UAS_MES_HYSX/FunctionCode/Make/Make_WirelessThroughput.cs

@@ -2,10 +2,20 @@
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
+using System.Diagnostics;
 using System.Drawing;
+using System.IO;
 using System.Linq;
+using System.Net.Sockets;
 using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Web.Services.Description;
+using System.Web.UI.WebControls.WebParts;
 using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
 
 namespace UAS_MES_NEW.Make
 {
@@ -15,5 +25,443 @@ namespace UAS_MES_NEW.Make
         {
             InitializeComponent();
         }
-    }
+
+        StringBuilder SQL = new StringBuilder();
+        DataTable dt;
+        DataHelper dh;
+
+        private void Make_WirelessThroughput_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+        }
+
+        private void Start_Click(object sender, EventArgs e)
+        {
+            if (IsCheckSet()) return;
+
+            ShowMsg(1, $"开始测试");
+            var tester = new CameraIperfTester(
+                cameraIp: ProductList.Text.Trim(),
+                username: Account.Text.Trim(),
+                password: ProductList.Text.Trim(),
+                iperfServerIp: IPList.Text.Trim()
+            );
+
+            var loginResult = tester.TelnetLogin();
+            if (!loginResult.Success)
+            {
+                ShowMsg(0, $"Telnet登录失败,{loginResult.Message}");
+                return;
+            }
+            ShowMsg(1, $"Telnet登录成功");
+
+            var testResult = tester.StartIperfTest(
+                iperfToolPath: @"C:\iperf\iperf3.exe",
+                logDirectory: @"C:\iperf_logs"
+            );
+
+        }
+
+        private void SN_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+            UpdateSN("L", SN.Text.Trim());
+
+        }
+
+        private bool IsCheckSet()
+        {
+            if (string.IsNullOrEmpty(IPList.Text))
+            {
+                ShowMsg(0, "请选择本地iperf 服务IP地址");
+                return true;
+            }
+
+            if (string.IsNullOrEmpty(ProductList.Text))
+            {
+                ShowMsg(0, "请选择产品固定IP地址");
+                return true;
+            }
+
+            if (string.IsNullOrEmpty(Account.Text))
+            {
+                ShowMsg(0, "请输入Telnet登录账号");
+                return true;
+            }
+
+            if (string.IsNullOrEmpty(Password.Text))
+            {
+                ShowMsg(0, "请输入Telnet登录密码");
+                return true;
+            }
+
+            if (string.IsNullOrEmpty(TestTime.Text))
+            {
+                ShowMsg(0, "请输入测试时长");
+                return true;
+            }
+
+            //if (Locat1.Checked == false || Locat2.Checked == false || Locat3.Checked == false)
+            //{
+            //    ShowMsg(0, "请选择固件位置");
+            //    return true;
+            //}
+
+            //if (Radio1.Checked == false || Radio1.Checked == false )
+            //{
+            //    ShowMsg(0, "请选择测试类型");
+            //    return true;
+            //}
+            return false;
+        }
+
+        private void UpdateSN(string type, string sn)
+        {
+            if (type == "C")
+            {
+                serialNumber.Text = "";
+                workOrder.Text = "";
+                productCode.Text = "";
+                productName.Text = "";
+            }
+            else if (type == "L")
+            {
+                SQL.Clear();
+                SQL.Append($@"SELECT ms_sncode,ma_code,pr_code,pr_spec FROM makeserial,make,product
+                        WHERE ms_sncode = '{sn}' AND ms_makecode = ma_code AND ms_prodcode = pr_code");
+                dt = (DataTable)dh.ExecuteSql(SQL.ToString(), "select");
+                if (dt.Rows.Count > 0)
+                {
+                    serialNumber.Text = dt.Rows[0]["ms_sncode"].ToString();
+                    workOrder.Text = dt.Rows[0]["ma_code"].ToString();
+                    productCode.Text = dt.Rows[0]["pr_code"].ToString();
+                    productName.Text = dt.Rows[0]["pr_spec"].ToString();
+                }
+                else
+                {
+                    UpdateSN("C", sn);
+                }
+            }
+        }
+
+        private void ShowMsg(int type, string msg)
+        {
+            msg = msg.Replace("\r", "").Replace("\n", "");
+            string msgTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+            string showMsg = $"{msgTime}: {msg}\n";
+            if (type == 0)
+            {
+                OperatResult.AppendText(showMsg, Color.Red);
+            }
+            else if (type == 1)
+            {
+                OperatResult.AppendText(showMsg, Color.Green);
+            }
+        }
+
+        private void Radio1_Click(object sender, EventArgs e)
+        {
+            if (Radio1.Checked)
+            {
+                Radio2.Checked = false;
+            }
+        }
+
+        private void Radio2_Click(object sender, EventArgs e)
+        {
+            if (Radio2.Checked)
+            {
+                Radio1.Checked = false;
+            }
+        }
+
+        private void Locat1_Click(object sender, EventArgs e)
+        {
+            if (Locat1.Checked)
+            {
+                Locat2.Checked = false;
+                Locat3.Checked = false;
+            }
+        }
+
+        private void Locat2_Click(object sender, EventArgs e)
+        {
+            if (Locat2.Checked)
+            {
+                Locat1.Checked = false;
+                Locat3.Checked = false;
+            }
+        }
+
+        private void Locat3_Click(object sender, EventArgs e)
+        {
+            if (Locat3.Checked)
+            {
+                Locat1.Checked = false;
+                Locat2.Checked = false;
+            }
+        }
+
+        private void Account_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+            Password.Focus();
+            Password.SelectAll();
+        }
+
+        private void Password_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode != Keys.Enter) return;
+            TestTime.Focus();
+            TestTime.SelectAll();
+        }
+
+        public class CameraIperfTester
+        {
+            string cameraIp;
+            string username;
+            string password;
+            string iperfServerIp;
+            int telnetPort;
+            public CameraIperfTester(string cameraIp, string username, string password, string iperfServerIp, int telnetPort = 23)
+            {
+                this.cameraIp = cameraIp;
+                this.username = username;
+                this.password = password;
+                this.iperfServerIp = iperfServerIp;
+                this.telnetPort = telnetPort;
+            }
+            public TelnetLoginResult TelnetLogin()
+            {
+                try
+                {
+                    using (Process telnetProcess = new Process())
+                    {
+                        telnetProcess.StartInfo.FileName = "cmd.exe";
+                        telnetProcess.StartInfo.Arguments = $"/c telnet {cameraIp} {telnetPort}";
+                        telnetProcess.StartInfo.UseShellExecute = false;
+                        telnetProcess.StartInfo.RedirectStandardInput = true;
+                        telnetProcess.StartInfo.RedirectStandardOutput = true;
+                        telnetProcess.StartInfo.RedirectStandardError = true;
+                        telnetProcess.StartInfo.CreateNoWindow = true;
+
+                        StringBuilder output = new StringBuilder();
+                        AutoResetEvent outputWaitHandle = new AutoResetEvent(false);
+
+                        telnetProcess.OutputDataReceived += (sender, e) =>
+                        {
+                            if (e.Data == null)
+                            {
+                                outputWaitHandle.Set();
+                            }
+                            else
+                            {
+                                output.AppendLine(e.Data);
+                            }
+                        };
+
+                        telnetProcess.Start();
+                        telnetProcess.BeginOutputReadLine();
+
+                        // 发送登录凭证
+                        StreamWriter stdin = telnetProcess.StandardInput;
+                        stdin.WriteLine(username);
+                        Thread.Sleep(1000);
+                        stdin.WriteLine(password);
+                        Thread.Sleep(1000);
+
+                        // 检查登录是否成功的关键词
+                        string result = output.ToString();
+                        if (result.Contains("Login OK") || result.Contains("登录成功") || result.Contains("#") || result.Contains("$"))
+                        {
+                            stdin.WriteLine("exit");
+                            telnetProcess.WaitForExit(3000);
+                            return new TelnetLoginResult
+                            {
+                                Success = true,
+                                Message = result
+                            };
+                        }
+                        else
+                        {
+                            stdin.WriteLine("exit");
+                            telnetProcess.WaitForExit(3000);
+
+                            return new TelnetLoginResult
+                            {
+                                Success = false,
+                                Message = result
+                            };
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    return new TelnetLoginResult
+                    {
+                        Success = false,
+                        Message = $"Telnet登录异常: {ex.Message}",
+                        RawOutput = ex.ToString()
+                    };
+                }
+            }
+            public IperfTestResult StartIperfTest(string iperfToolPath, string logDirectory)
+            {
+                try
+                {
+                    // 生成基于时间的日志文件名
+                    string timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");
+                    string upLogPath = Path.Combine(logDirectory, $"iperf_up_{timestamp}.log");
+                    string downLogPath = Path.Combine(logDirectory, $"iperf_down_{timestamp}.log");
+
+                    // 通过telnet执行iperf服务器端命令
+                    var telnetResult = ExecuteTelnetCommands();
+                    if (!telnetResult.Success)
+                    {
+                        return new IperfTestResult
+                        {
+                            Success = false,
+                            Message = "在摄像机端启动iperf服务器失败",
+                            UpLogPath = "",
+                            DownLogPath = ""
+                        };
+                    }
+
+                    // 测试上行流量
+                    ExecuteIperfTest(iperfToolPath, $"-c {iperfServerIp} -p 5201 -t 10 -w 1M -i 1 -P 8 -R", upLogPath);
+
+                    // 等待2S
+                    Thread.Sleep(2000);
+
+                    // 测试下行流量
+                    ExecuteIperfTest(iperfToolPath, $"-c {iperfServerIp} -p 5201 -t 10 -w 1M -i 1 -P 8", downLogPath);
+
+                    return new IperfTestResult
+                    {
+                        Success = true,
+                        Message = "iperf测试完成",
+                        UpLogPath = upLogPath,
+                        DownLogPath = downLogPath
+                    };
+                }
+                catch (Exception ex)
+                {
+                    return new IperfTestResult
+                    {
+                        Success = false,
+                        Message = $"iperf测试异常: {ex.Message}",
+                        UpLogPath = "",
+                        DownLogPath = ""
+                    };
+                }
+            }
+            private void ExecuteIperfTest(string iperfToolPath, string arguments, string logPath)
+            {
+                using (Process iperfProcess = new Process())
+                {
+                    iperfProcess.StartInfo.FileName = iperfToolPath;
+                    iperfProcess.StartInfo.Arguments = arguments;
+                    iperfProcess.StartInfo.UseShellExecute = false;
+                    iperfProcess.StartInfo.RedirectStandardOutput = true;
+                    iperfProcess.StartInfo.CreateNoWindow = true;
+
+                    iperfProcess.Start();
+
+                    string output = iperfProcess.StandardOutput.ReadToEnd();
+                    iperfProcess.WaitForExit();
+
+                    // 将输出写入日志文件
+                    File.WriteAllText(logPath, output);
+                }
+            }
+
+            private TelnetLoginResult ExecuteTelnetCommands()
+            {
+                try
+                {
+                    using (Process telnetProcess = new Process())
+                    {
+                        telnetProcess.StartInfo.FileName = "telnet";
+                        telnetProcess.StartInfo.Arguments = $"{cameraIp} {telnetPort}";
+                        telnetProcess.StartInfo.UseShellExecute = false;
+                        telnetProcess.StartInfo.RedirectStandardInput = true;
+                        telnetProcess.StartInfo.RedirectStandardOutput = true;
+                        telnetProcess.StartInfo.RedirectStandardError = true;
+                        telnetProcess.StartInfo.CreateNoWindow = true;
+
+                        StringBuilder output = new StringBuilder();
+                        AutoResetEvent outputWaitHandle = new AutoResetEvent(false);
+
+                        telnetProcess.OutputDataReceived += (sender, e) =>
+                        {
+                            if (e.Data == null)
+                            {
+                                outputWaitHandle.Set();
+                            }
+                            else
+                            {
+                                output.AppendLine(e.Data);
+                            }
+                        };
+
+                        telnetProcess.Start();
+                        telnetProcess.BeginOutputReadLine();
+
+                        StreamWriter stdin = telnetProcess.StandardInput;
+
+                        // 发送登录凭证
+                        stdin.WriteLine(username);
+                        Thread.Sleep(1000);
+                        stdin.WriteLine(password);
+                        Thread.Sleep(2000);
+
+                        // 执行iperf相关命令
+                        stdin.WriteLine("killall iperf3_mstar");
+                        Thread.Sleep(1000);
+                        stdin.WriteLine("cp /mnt/tf/usb1_1/iperf3_mstar /var/tmp/ -f");
+                        Thread.Sleep(1000);
+                        stdin.WriteLine("chmod a+x /var/tmp/iperf3_mstar");
+                        Thread.Sleep(1000);
+                        stdin.WriteLine("/var/tmp/iperf3_mstar -s -p 5201 -i 1 &");
+                        Thread.Sleep(2000);
+
+                        // 发送退出命令
+                        stdin.WriteLine("exit");
+                        telnetProcess.WaitForExit(5000);
+
+                        return new TelnetLoginResult
+                        {
+                            Success = true,
+                            Message = "Telnet命令执行完成",
+                            RawOutput = output.ToString()
+                        };
+                    }
+                }
+                catch (Exception ex)
+                {
+                    return new TelnetLoginResult
+                    {
+                        Success = false,
+                        Message = $"Telnet命令执行异常: {ex.Message}",
+                        RawOutput = ex.ToString()
+                    };
+                }
+            }
+
+            public class TelnetLoginResult
+            {
+                public bool Success { get; set; }
+                public string Message { get; set; }
+                public string RawOutput { get; set; }
+            }
+            public class IperfTestResult
+            {
+                public bool Success { get; set; }
+                public string Message { get; set; }
+                public string UpLogPath { get; set; }
+                public string DownLogPath { get; set; }
+            }
+            
+        }
+        }
 }