LL18-25062501;修改得辉达反馈保存ini文件压差和泄漏量为0,没有sn问题

This commit is contained in:
jfp
2025-06-25 12:00:25 +08:00
parent c189711a92
commit d89bcfeee6
21 changed files with 123 additions and 304 deletions

View File

@@ -89,7 +89,6 @@
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.label35 = new System.Windows.Forms.Label(); this.label35 = new System.Windows.Forms.Label();
this.ChkExcel = new System.Windows.Forms.CheckBox(); this.ChkExcel = new System.Windows.Forms.CheckBox();
this.ChkTXT = new System.Windows.Forms.CheckBox();
this.path = new System.Windows.Forms.TextBox(); this.path = new System.Windows.Forms.TextBox();
this.MESStatus = new System.Windows.Forms.Label(); this.MESStatus = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label();
@@ -376,7 +375,7 @@
this.label36.Font = new System.Drawing.Font("宋体", 12F); this.label36.Font = new System.Drawing.Font("宋体", 12F);
this.label36.Location = new System.Drawing.Point(162, 326); this.label36.Location = new System.Drawing.Point(162, 326);
this.label36.Name = "label36"; this.label36.Name = "label36";
this.label36.Size = new System.Drawing.Size(71, 16); this.label36.Size = new System.Drawing.Size(72, 16);
this.label36.TabIndex = 89; this.label36.TabIndex = 89;
this.label36.Text = "测试进度"; this.label36.Text = "测试进度";
// //
@@ -386,7 +385,7 @@
this.Manual.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); this.Manual.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold);
this.Manual.Location = new System.Drawing.Point(777, 5); this.Manual.Location = new System.Drawing.Point(777, 5);
this.Manual.Name = "Manual"; this.Manual.Name = "Manual";
this.Manual.Size = new System.Drawing.Size(16, 16); this.Manual.Size = new System.Drawing.Size(17, 16);
this.Manual.TabIndex = 63; this.Manual.TabIndex = 63;
this.Manual.TabStop = true; this.Manual.TabStop = true;
this.Manual.Text = "?"; this.Manual.Text = "?";
@@ -590,7 +589,7 @@
this.ToolStripMenuItem}); this.ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1028, 25); this.menuStrip1.Size = new System.Drawing.Size(1025, 25);
this.menuStrip1.TabIndex = 126; this.menuStrip1.TabIndex = 126;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
this.menuStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.menuStrip1_ItemClicked); this.menuStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.menuStrip1_ItemClicked);
@@ -672,17 +671,6 @@
this.ChkExcel.Text = "导出到Excel"; this.ChkExcel.Text = "导出到Excel";
this.ChkExcel.UseVisualStyleBackColor = true; this.ChkExcel.UseVisualStyleBackColor = true;
// //
// ChkTXT
//
this.ChkTXT.AutoSize = true;
this.ChkTXT.Font = new System.Drawing.Font("宋体", 9F);
this.ChkTXT.Location = new System.Drawing.Point(1444, 395);
this.ChkTXT.Name = "ChkTXT";
this.ChkTXT.Size = new System.Drawing.Size(78, 16);
this.ChkTXT.TabIndex = 130;
this.ChkTXT.Text = "导出到TXT";
this.ChkTXT.UseVisualStyleBackColor = true;
//
// path // path
// //
this.path.Location = new System.Drawing.Point(1444, 347); this.path.Location = new System.Drawing.Point(1444, 347);
@@ -772,7 +760,7 @@
this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(872, 50); this.label9.Location = new System.Drawing.Point(872, 50);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(87, 16); this.label9.Size = new System.Drawing.Size(88, 16);
this.label9.TabIndex = 143; this.label9.TabIndex = 143;
this.label9.Text = "条形码长度"; this.label9.Text = "条形码长度";
// //
@@ -782,7 +770,7 @@
this.Scancode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Scancode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Scancode.Location = new System.Drawing.Point(1596, 57); this.Scancode.Location = new System.Drawing.Point(1596, 57);
this.Scancode.Name = "Scancode"; this.Scancode.Name = "Scancode";
this.Scancode.Size = new System.Drawing.Size(90, 20); this.Scancode.Size = new System.Drawing.Size(91, 20);
this.Scancode.TabIndex = 144; this.Scancode.TabIndex = 144;
this.Scancode.Text = "扫码启动"; this.Scancode.Text = "扫码启动";
this.Scancode.UseVisualStyleBackColor = true; this.Scancode.UseVisualStyleBackColor = true;
@@ -820,7 +808,7 @@
this.Passzong.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Passzong.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Passzong.Location = new System.Drawing.Point(84, 99); this.Passzong.Location = new System.Drawing.Point(84, 99);
this.Passzong.Name = "Passzong"; this.Passzong.Name = "Passzong";
this.Passzong.Size = new System.Drawing.Size(23, 16); this.Passzong.Size = new System.Drawing.Size(24, 16);
this.Passzong.TabIndex = 3; this.Passzong.TabIndex = 3;
this.Passzong.Text = "10"; this.Passzong.Text = "10";
// //
@@ -840,7 +828,7 @@
this.Sunzong.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Sunzong.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Sunzong.Location = new System.Drawing.Point(84, 49); this.Sunzong.Location = new System.Drawing.Point(84, 49);
this.Sunzong.Name = "Sunzong"; this.Sunzong.Name = "Sunzong";
this.Sunzong.Size = new System.Drawing.Size(23, 16); this.Sunzong.Size = new System.Drawing.Size(24, 16);
this.Sunzong.TabIndex = 1; this.Sunzong.TabIndex = 1;
this.Sunzong.Text = "10"; this.Sunzong.Text = "10";
this.Sunzong.Click += new System.EventHandler(this.label29_Click); this.Sunzong.Click += new System.EventHandler(this.label29_Click);
@@ -1731,7 +1719,7 @@
this.label3.Font = new System.Drawing.Font("宋体", 12F); this.label3.Font = new System.Drawing.Font("宋体", 12F);
this.label3.Location = new System.Drawing.Point(25, 79); this.label3.Location = new System.Drawing.Point(25, 79);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(87, 16); this.label3.Size = new System.Drawing.Size(88, 16);
this.label3.TabIndex = 61; this.label3.TabIndex = 61;
this.label3.Text = "串口状态:"; this.label3.Text = "串口状态:";
// //
@@ -1763,7 +1751,7 @@
this.label1.Font = new System.Drawing.Font("宋体", 12F); this.label1.Font = new System.Drawing.Font("宋体", 12F);
this.label1.Location = new System.Drawing.Point(37, 32); this.label1.Location = new System.Drawing.Point(37, 32);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(63, 16); this.label1.Size = new System.Drawing.Size(64, 16);
this.label1.TabIndex = 8; this.label1.TabIndex = 8;
this.label1.Text = "端口号:"; this.label1.Text = "端口号:";
// //
@@ -1781,7 +1769,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1028, 675); this.ClientSize = new System.Drawing.Size(1025, 675);
this.Controls.Add(this.textBox1); this.Controls.Add(this.textBox1);
this.Controls.Add(this.label50); this.Controls.Add(this.label50);
this.Controls.Add(this.textBox3); this.Controls.Add(this.textBox3);
@@ -1810,7 +1798,6 @@
this.Controls.Add(this.label7); this.Controls.Add(this.label7);
this.Controls.Add(this.label35); this.Controls.Add(this.label35);
this.Controls.Add(this.ChkExcel); this.Controls.Add(this.ChkExcel);
this.Controls.Add(this.ChkTXT);
this.Controls.Add(this.path); this.Controls.Add(this.path);
this.Controls.Add(this.Manual); this.Controls.Add(this.Manual);
this.Controls.Add(this.MachineStatus); this.Controls.Add(this.MachineStatus);
@@ -1841,7 +1828,7 @@
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1"; this.Name = "Form1";
this.Text = "LL18-25062101"; this.Text = "LL18-25062501";
this.Activated += new System.EventHandler(this.Form1_Activated); this.Activated += new System.EventHandler(this.Form1_Activated);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load); this.Load += new System.EventHandler(this.Form1_Load);
@@ -1946,7 +1933,6 @@
private System.Windows.Forms.Label label35; private System.Windows.Forms.Label label35;
public System.Windows.Forms.CheckBox ChkMES; public System.Windows.Forms.CheckBox ChkMES;
public System.Windows.Forms.CheckBox ChkExcel; public System.Windows.Forms.CheckBox ChkExcel;
public System.Windows.Forms.CheckBox ChkTXT;
public System.Windows.Forms.TextBox path; public System.Windows.Forms.TextBox path;
public System.Windows.Forms.CheckBox ChkSql; public System.Windows.Forms.CheckBox ChkSql;
private System.Windows.Forms.ComboBox PUnit; private System.Windows.Forms.ComboBox PUnit;

View File

@@ -43,8 +43,9 @@ namespace C_Windows_1
private double delaytime; private double delaytime;
private float X, Y; private float X, Y;
private string DLeakPressure = "0"; private string DLeakPressure = "0"; //测试压力
private string DLeak = "0"; private string DLeak = "0"; //泄漏量
private string DPressureDiff = "0"; //压差
public OperateResult operateResult21; public OperateResult operateResult21;
public OperateResult operateResult22; public OperateResult operateResult22;
public OperateResult<bool> operateResult23; public OperateResult<bool> operateResult23;
@@ -62,7 +63,8 @@ namespace C_Windows_1
public static string tablename; public static string tablename;
string CODE; string CODE;
public bool ChkINI; public bool checkINI; //选中ini导出
public bool checkTxt; //选中txt导出
public Form1() public Form1()
{ {
@@ -349,8 +351,7 @@ namespace C_Windows_1
ReadData[9] = 0; ReadData[9] = 0;
operateResult21 = Modbusread(25, 6, ReadData); operateResult21 = Modbusread(25, 6, ReadData);
Tlight.Text = ""; Tlight.Text = "";
CODE= Code.Text = PreCode1.Text; CODE= Code.Text;
PreCode1.Text="";
if (operateResult21.IsSuccess == true) if (operateResult21.IsSuccess == true)
{ {
int aaa; int aaa;
@@ -381,18 +382,24 @@ namespace C_Windows_1
Modbusread(25, 12, ReadData); Modbusread(25, 12, ReadData);
Modbusread(37, 1, ReadData); Modbusread(37, 1, ReadData);
Modbusread(38, 12, ReadData); Modbusread(38, 12, ReadData);
Modbusread(161, 2, ReadData);
//test(ReadData); //test(ReadData);
int ba = progressBar2.Value + 2; int ba = progressBar2.Value + 2;
if (ba >= progressBar2.Maximum) if (ba >= progressBar2.Maximum)
ba = progressBar2.Maximum; ba = progressBar2.Maximum;
progressBar2.Value = ba; progressBar2.Value = ba;
MachineStatus.Text = "测试中"; MachineStatus.Text = "测试中";
//if (ReadData[8] != 0 && (ReadData[9] == 1 || ReadData[9] == 2))//当仪器状态位不为0且有结果时 //泄漏量
//{ if (ReadData[19] !=0 || ReadData[18] != 0)
// workstation = (int)yiqi.finish; {
// //return workstation; DLeak = TwoUInt16ToFloat(ReadData[19], ReadData[18]).ToString("f1");
//} }
//压差
if (ReadData[161] != 0 || ReadData[162] != 0)
{
DPressureDiff = TwoUInt16ToFloat(ReadData[162], ReadData[161]).ToString("f3");
}
if (ReadData[8] == 0) if (ReadData[8] == 0)
{ {
System.Threading.Thread.Sleep(200); System.Threading.Thread.Sleep(200);
@@ -405,6 +412,8 @@ namespace C_Windows_1
{ {
progressBar2.Value = 0; progressBar2.Value = 0;
workstation = (int)yiqi.standby; workstation = (int)yiqi.standby;
DLeak = "0.0";
DPressureDiff = "0.000";
} }
} }
break; break;
@@ -419,7 +428,6 @@ namespace C_Windows_1
break; break;
case (int)yiqi.finish: case (int)yiqi.finish:
Modbusread(161, 2, ReadData); // 压差
Modbusread(16, 4, ReadData); Modbusread(16, 4, ReadData);
progressBar2.Value = progressBar2.Maximum; progressBar2.Value = progressBar2.Maximum;
DataGridView1.Invoke(new System.Action(Display)); DataGridView1.Invoke(new System.Action(Display));
@@ -821,7 +829,6 @@ namespace C_Windows_1
//CH1文本框读取的压力和泄漏量 //CH1文本框读取的压力和泄漏量
LeakPressure.Text = TwoUInt16ToFloat(ReadData[17], ReadData[16]).ToString("f3"); LeakPressure.Text = TwoUInt16ToFloat(ReadData[17], ReadData[16]).ToString("f3");
Leak.Text = TwoUInt16ToFloat(ReadData[19], ReadData[18]).ToString("f1"); Leak.Text = TwoUInt16ToFloat(ReadData[19], ReadData[18]).ToString("f1");
break; break;
case (int)yiqi.finish: case (int)yiqi.finish:
@@ -2041,124 +2048,12 @@ namespace C_Windows_1
GC.Collect(); GC.Collect();
} }
/* /// <summary>
private void AddTXT() /// 添加配置文件
/// </summary>
/// <param name="iType">0:INI; 1:TXT</param>
private void AddINI(int iType = 0)
{ {
//string fileName;
//string file = DateTime.Now.ToString("yyyyMMdd");
//if (path.Text == "")
//{
// fileName = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\leaktest.txt";
//}
//else
//{
// fileName = path.Text + "\\" + file + ".txt";
//}
// 文件路径
//string basePath = string.IsNullOrEmpty(path.Text) ? Environment.GetFolderPath(Environment.SpecialFolder.Desktop) : path.Text; //桌面
string basePath = string.IsNullOrEmpty(path.Text) ? Application.StartupPath : path.Text;
// 目标路径下创建MES子目录
string logDirectory = Path.Combine(basePath, "MES");
Directory.CreateDirectory(logDirectory);
// 文件名
string fileName = $"{CODE}_{DateTime.Now:yyMMdd_HHmmss}.txt";
string fullPath = Path.Combine(logDirectory, fileName);
string str1 = "时间 " + DateTime.Now +
" 条形码 " + CODE +
" 充气时间 " + ReadData[25] / 10.0 + "s" +
" 平衡时间 " + ReadData[26] / 10.0 + "s" +
" 检测时间 " + ReadData[27] / 10.0 + "s" +
" 排气时间 " + ReadData[28] / 10.0 + "s" +
" 充气压力上限 " + TwoUInt16ToFloat(ReadData[33], ReadData[32]).ToString() + PressureUnit.Text +
" 充气压力下限 " + TwoUInt16ToFloat(ReadData[47], ReadData[46]).ToString() + PressureUnit.Text +
//" 大漏压差上限 " + ReadData[36] + LeakUnit.Text +
//" 大漏压差下限 " + (Digitalconversion(ReadData[37])).ToString() + LeakUnit.Text +
" 泄漏量上限 " + TwoUInt16ToFloat(ReadData[39], ReadData[38]).ToString() + LeakUnit.Text +
" 泄漏量下限 " + TwoUInt16ToFloat(ReadData[45], ReadData[44]).ToString() + LeakUnit.Text +
" 测试结果 " + Tlight.Text +
" 测试压力 " + TwoUInt16ToFloat(ReadData[17], ReadData[16]).ToString() +
" 压力单位 " + PressureUnit.Text +
" 泄漏量 " + DLeak +
" 泄漏量单位 " + LeakUnit.Text + " \n";
System.IO.File.AppendAllText(fullPath, str1);
}
*/
//将数据写入TXT
private void AddTXT()
{
//Console.WriteLine("AddTXT()");
//CODE = "N2479000099"; // 测试用SN
//ReadData[25] = 2;
//ReadData[26] = 2;
//ReadData[27] = 2;
//ReadData[28] = 2;
try
{
// 文件路径
// string basePath = string.IsNullOrEmpty(path.Text) ? Environment.GetFolderPath(Environment.SpecialFolder.Desktop) : path.Text; //桌面
string basePath = string.IsNullOrEmpty(path.Text) ? Application.StartupPath : path.Text;
// 目标路径下创建MES子目录
string logDirectory = Path.Combine(basePath, "MES");
Directory.CreateDirectory(logDirectory);
// 文件名
string fileName = $"{CODE}_{DateTime.Now:yyMMdd_HHmmss}.txt";
string fullPath = Path.Combine(logDirectory, fileName);
string testResult = Tlight.Text;
if (string.IsNullOrEmpty(testResult.Trim()))
{
testResult = "fail";
}
// INI内容
StringBuilder iniContent = new StringBuilder();
iniContent.AppendLine("[Info]");
iniContent.AppendLine($"sn={CODE} ");//#SN号码
iniContent.AppendLine($"type= ");//#当前工站名称
//iniContent.AppendLine("wifi_mac= ");//#wifimac
//iniContent.AppendLine("bt_mac= "); //#btmac
string testDetails =
$"检测压力={TwoUInt16ToFloat(ReadData[17], ReadData[16]).ToString()};" +
$"充气时间={ReadData[25] / 10.0 + "s"};" +
$"平衡时间={ReadData[26] / 10.0 + "s"};" +
$"检测时间={ReadData[27] / 10.0 + "s"};" +
$"排气时间={ReadData[28] / 10.0 + "s"};" +
$"当前压差={TwoUInt16ToFloat(ReadData[162], ReadData[161]).ToString()};" +
$"泄露量={DLeak};"; // TwoUInt16ToFloat(ReadData[19], ReadData[18]).ToString("f1")
iniContent.AppendLine($"message={testDetails}");//#测试项目与结果记录
float totalTime = (ReadData[25] + ReadData[26] + ReadData[27] + ReadData[28]) / 10.0f;
iniContent.AppendLine($"totaltime={totalTime}"); //#测试所用时间
iniContent.AppendLine($"starttime={DateTime.Now:yyyy/MM/dd HH:mm:ss}");// #开始时间
iniContent.AppendLine($"endtime={DateTime.Now.AddSeconds(totalTime):yyyy/MM/dd HH:mm:ss} ");//#结束时间
iniContent.AppendLine($"result={testResult}");//#Pass or Fail
// 7. 写入文件
File.WriteAllText(fullPath, iniContent.ToString(), Encoding.UTF8);
}
catch (Exception ex)
{
MessageBox.Show($"生成日志失败:{ex.Message}");
}
}
private void AddINI()
{
//Console.WriteLine("AddINI()");
//CODE = "N2479000099"; // 测试用SN
//ReadData[25] = 2;
//ReadData[26] = 2;
//ReadData[27] = 2;
//ReadData[28] = 2;
try try
{ {
// 文件路径 // 文件路径
@@ -2169,7 +2064,8 @@ namespace C_Windows_1
Directory.CreateDirectory(logDirectory); Directory.CreateDirectory(logDirectory);
// 文件名 // 文件名
string fileName = $"{CODE}_{DateTime.Now:yyMMdd_HHmmss}.ini"; string fileName = $"{CODE}_{DateTime.Now:yyMMdd_HHmmss}.";
fileName += iType == 0 ? "ini" : "txt";
string fullPath = Path.Combine(logDirectory, fileName); string fullPath = Path.Combine(logDirectory, fileName);
string testResult = Tlight.Text; string testResult = Tlight.Text;
@@ -2191,7 +2087,7 @@ namespace C_Windows_1
$"平衡时间={ReadData[26] / 10.0 + "s"};" + $"平衡时间={ReadData[26] / 10.0 + "s"};" +
$"检测时间={ReadData[27] / 10.0 + "s"};" + $"检测时间={ReadData[27] / 10.0 + "s"};" +
$"排气时间={ReadData[28] / 10.0 + "s"};" + $"排气时间={ReadData[28] / 10.0 + "s"};" +
$"当前压差={TwoUInt16ToFloat(ReadData[162], ReadData[161]).ToString()};" + $"当前压差={DPressureDiff};" +
$"泄露量={DLeak};"; // TwoUInt16ToFloat(ReadData[19], ReadData[18]).ToString("f1") $"泄露量={DLeak};"; // TwoUInt16ToFloat(ReadData[19], ReadData[18]).ToString("f1")
iniContent.AppendLine($"message={testDetails}");//#测试项目与结果记录 iniContent.AppendLine($"message={testDetails}");//#测试项目与结果记录
float totalTime = (ReadData[25] + ReadData[26] + ReadData[27] + ReadData[28]) / 10.0f; float totalTime = (ReadData[25] + ReadData[26] + ReadData[27] + ReadData[28]) / 10.0f;
@@ -2373,20 +2269,15 @@ namespace C_Windows_1
//} //}
//Console.WriteLine("ChkTXT.Checked:" + ChkTXT.Checked); //Console.WriteLine("ChkTXT.Checked:" + ChkTXT.Checked);
//Console.WriteLine("ChkINI:" + ChkINI); //Console.WriteLine("ChkINI:" + ChkINI);
if (ChkTXT.Checked)
if (checkTxt)
{ {
AddTXT(); AddINI(1);
} }
if (ChkINI) if(checkINI)
{ {
AddINI(); AddINI(0);
// 测试失败不允许生成log文件
//if (Tlight.Text.Contains("OK"))
//{
// AddINI();
//}
} }
//if (ChkSql.Checked) //if (ChkSql.Checked)
//{ //{
@@ -2747,20 +2638,20 @@ namespace C_Windows_1
if (regName.GetValue("txt") is null) if (regName.GetValue("txt") is null)
{ {
ChkTXT.Checked = false; checkTxt = false;
} }
else else
{ {
ChkTXT.Checked = Convert.ToBoolean(regName.GetValue("txt").ToString()); checkTxt = Convert.ToBoolean(regName.GetValue("txt").ToString());
} }
if (regName.GetValue("ini") is null) if (regName.GetValue("ini") is null)
{ {
ChkINI = false; checkINI = false;
} }
else else
{ {
ChkINI = Convert.ToBoolean(regName.GetValue("ini").ToString()); checkINI = Convert.ToBoolean(regName.GetValue("ini").ToString());
} }
if (regName.GetValue("sql") is null) if (regName.GetValue("sql") is null)
@@ -3125,21 +3016,6 @@ namespace C_Windows_1
bool flag3 = this.Code.TextLength == int.Parse(this.CodeLength.Text) && this.checkBox1.Checked; bool flag3 = this.Code.TextLength == int.Parse(this.CodeLength.Text) && this.checkBox1.Checked;
if (flag3) if (flag3)
{ {
//InserPatch(Code.Text, 1);
//if (checkBox2.Checked)
//{
// int obj = await InMes(1);
// if (obj == 1)
// {
// this.textBox3.Text = "入站 OK";
// this.textBox3.BackColor = Color.Green;
// }
// else
// {
// this.textBox3.Text = "入站 OK";
// this.textBox3.BackColor = Color.Green;
// }
//}
string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
BarcodeInfo.InsertBarcodeData(time, Code.Text, "", "", "", "", "", ""); BarcodeInfo.InsertBarcodeData(time, Code.Text, "", "", "", "", "", "");

View File

@@ -60,10 +60,10 @@
// //
this.ChkMES.AutoSize = true; this.ChkMES.AutoSize = true;
this.ChkMES.Font = new System.Drawing.Font("宋体", 12F); this.ChkMES.Font = new System.Drawing.Font("宋体", 12F);
this.ChkMES.Location = new System.Drawing.Point(567, 176); this.ChkMES.Location = new System.Drawing.Point(550, 186);
this.ChkMES.Margin = new System.Windows.Forms.Padding(5); this.ChkMES.Margin = new System.Windows.Forms.Padding(5);
this.ChkMES.Name = "ChkMES"; this.ChkMES.Name = "ChkMES";
this.ChkMES.Size = new System.Drawing.Size(98, 20); this.ChkMES.Size = new System.Drawing.Size(99, 20);
this.ChkMES.TabIndex = 106; this.ChkMES.TabIndex = 106;
this.ChkMES.Text = "导出到Mes"; this.ChkMES.Text = "导出到Mes";
this.ChkMES.UseVisualStyleBackColor = true; this.ChkMES.UseVisualStyleBackColor = true;
@@ -86,7 +86,7 @@
this.label35.Location = new System.Drawing.Point(15, 14); this.label35.Location = new System.Drawing.Point(15, 14);
this.label35.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label35.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label35.Name = "label35"; this.label35.Name = "label35";
this.label35.Size = new System.Drawing.Size(39, 16); this.label35.Size = new System.Drawing.Size(40, 16);
this.label35.TabIndex = 105; this.label35.TabIndex = 105;
this.label35.Text = "路径"; this.label35.Text = "路径";
this.label35.Click += new System.EventHandler(this.label35_Click); this.label35.Click += new System.EventHandler(this.label35_Click);
@@ -98,7 +98,7 @@
this.ChkExcel.Location = new System.Drawing.Point(297, 441); this.ChkExcel.Location = new System.Drawing.Point(297, 441);
this.ChkExcel.Margin = new System.Windows.Forms.Padding(5); this.ChkExcel.Margin = new System.Windows.Forms.Padding(5);
this.ChkExcel.Name = "ChkExcel"; this.ChkExcel.Name = "ChkExcel";
this.ChkExcel.Size = new System.Drawing.Size(114, 20); this.ChkExcel.Size = new System.Drawing.Size(115, 20);
this.ChkExcel.TabIndex = 102; this.ChkExcel.TabIndex = 102;
this.ChkExcel.Text = "导出到Excel"; this.ChkExcel.Text = "导出到Excel";
this.ChkExcel.UseVisualStyleBackColor = true; this.ChkExcel.UseVisualStyleBackColor = true;
@@ -112,7 +112,7 @@
this.ChkTXT.Location = new System.Drawing.Point(152, 227); this.ChkTXT.Location = new System.Drawing.Point(152, 227);
this.ChkTXT.Margin = new System.Windows.Forms.Padding(5); this.ChkTXT.Margin = new System.Windows.Forms.Padding(5);
this.ChkTXT.Name = "ChkTXT"; this.ChkTXT.Name = "ChkTXT";
this.ChkTXT.Size = new System.Drawing.Size(98, 20); this.ChkTXT.Size = new System.Drawing.Size(99, 20);
this.ChkTXT.TabIndex = 103; this.ChkTXT.TabIndex = 103;
this.ChkTXT.Text = "导出到TXT"; this.ChkTXT.Text = "导出到TXT";
this.ChkTXT.UseVisualStyleBackColor = true; this.ChkTXT.UseVisualStyleBackColor = true;
@@ -134,7 +134,7 @@
this.ChkSql.Location = new System.Drawing.Point(550, 232); this.ChkSql.Location = new System.Drawing.Point(550, 232);
this.ChkSql.Margin = new System.Windows.Forms.Padding(5); this.ChkSql.Margin = new System.Windows.Forms.Padding(5);
this.ChkSql.Name = "ChkSql"; this.ChkSql.Name = "ChkSql";
this.ChkSql.Size = new System.Drawing.Size(146, 20); this.ChkSql.Size = new System.Drawing.Size(147, 20);
this.ChkSql.TabIndex = 104; this.ChkSql.TabIndex = 104;
this.ChkSql.Text = "导出到SqlServer"; this.ChkSql.Text = "导出到SqlServer";
this.ChkSql.UseVisualStyleBackColor = true; this.ChkSql.UseVisualStyleBackColor = true;
@@ -142,7 +142,7 @@
// //
// BtnConSql // BtnConSql
// //
this.BtnConSql.Location = new System.Drawing.Point(135, 357); this.BtnConSql.Location = new System.Drawing.Point(135, 369);
this.BtnConSql.Margin = new System.Windows.Forms.Padding(5); this.BtnConSql.Margin = new System.Windows.Forms.Padding(5);
this.BtnConSql.Name = "BtnConSql"; this.BtnConSql.Name = "BtnConSql";
this.BtnConSql.Size = new System.Drawing.Size(151, 53); this.BtnConSql.Size = new System.Drawing.Size(151, 53);
@@ -161,7 +161,6 @@
this.BtnConMES.TabIndex = 108; this.BtnConMES.TabIndex = 108;
this.BtnConMES.Text = "MES设置"; this.BtnConMES.Text = "MES设置";
this.BtnConMES.UseVisualStyleBackColor = true; this.BtnConMES.UseVisualStyleBackColor = true;
this.BtnConMES.Visible = false;
this.BtnConMES.Click += new System.EventHandler(this.BtnConMES_Click); this.BtnConMES.Click += new System.EventHandler(this.BtnConMES_Click);
// //
// OpenFileDialog1 // OpenFileDialog1
@@ -186,7 +185,7 @@
this.label3.Location = new System.Drawing.Point(251, 9); this.label3.Location = new System.Drawing.Point(251, 9);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(151, 16); this.label3.Size = new System.Drawing.Size(152, 16);
this.label3.TabIndex = 115; this.label3.TabIndex = 115;
this.label3.Text = "请先预装WPS或excel"; this.label3.Text = "请先预装WPS或excel";
this.label3.Click += new System.EventHandler(this.label3_Click); this.label3.Click += new System.EventHandler(this.label3_Click);
@@ -198,7 +197,7 @@
this.ChkINI.Location = new System.Drawing.Point(152, 186); this.ChkINI.Location = new System.Drawing.Point(152, 186);
this.ChkINI.Margin = new System.Windows.Forms.Padding(5); this.ChkINI.Margin = new System.Windows.Forms.Padding(5);
this.ChkINI.Name = "ChkINI"; this.ChkINI.Name = "ChkINI";
this.ChkINI.Size = new System.Drawing.Size(98, 20); this.ChkINI.Size = new System.Drawing.Size(99, 20);
this.ChkINI.TabIndex = 116; this.ChkINI.TabIndex = 116;
this.ChkINI.Text = "导出到INI"; this.ChkINI.Text = "导出到INI";
this.ChkINI.UseVisualStyleBackColor = true; this.ChkINI.UseVisualStyleBackColor = true;
@@ -207,7 +206,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(416, 475); this.ClientSize = new System.Drawing.Size(424, 475);
this.Controls.Add(this.ChkINI); this.Controls.Add(this.ChkINI);
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
this.Controls.Add(this.ChkCSV); this.Controls.Add(this.ChkCSV);

View File

@@ -61,10 +61,10 @@ namespace C_Windows_1
Form1.f1.path.Text = path.Text; Form1.f1.path.Text = path.Text;
Form1.f1.ChkExcel.Checked = ChkExcel.Checked; Form1.f1.ChkExcel.Checked = ChkExcel.Checked;
Form1.f1.ChkSql.Checked = ChkSql.Checked; Form1.f1.ChkSql.Checked = ChkSql.Checked;
Form1.f1.ChkTXT.Checked = ChkTXT.Checked; Form1.f1.checkTxt = ChkTXT.Checked;
Form1.f1.checkINI = ChkINI.Checked;
Form1.f1.ChkMES.Checked = ChkMES.Checked; Form1.f1.ChkMES.Checked = ChkMES.Checked;
Form1.f1.ChkCSV.Checked = ChkCSV.Checked; Form1.f1.ChkCSV.Checked = ChkCSV.Checked;
Form1.f1.ChkINI = ChkINI.Checked;
this.Close(); this.Close();
} }

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力= ;平衡时间= ;测试时间= ;当前压差= ;泄露值=
totaltime=0.8
starttime=2025/06/20 16:49:55
endtime=2025/06/20 16:49:56
result=

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力= ;充气时间= ;平衡时间= ;检测时间= ;排气时间= ;当前压差= ;泄露值= ;
totaltime=0.8
starttime=2025/06/20 16:55:44
endtime=2025/06/20 16:55:45
result=

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力= ;充气时间= ;平衡时间= ;检测时间= ;排气时间= ;当前压差= ;泄露值= ;
totaltime=0.8
starttime=2025/06/20 16:56:31
endtime=2025/06/20 16:56:32
result=

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力= ;充气时间= ;平衡时间= ;检测时间= ;排气时间= ;当前压差= ;泄露值= ;
totaltime=0.8
starttime=2025/06/20 16:59:25
endtime=2025/06/20 16:59:26
result=

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力= ;充气时间= ;平衡时间= ;检测时间= ;排气时间= ;当前压差= ;泄露值= ;
totaltime=0.8
starttime=2025/06/20 17:26:01
endtime=2025/06/20 17:26:02
result=

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力= ;充气时间= ;平衡时间= ;检测时间= ;排气时间= ;当前压差= ;泄露值= ;
totaltime=0.8
starttime=2025/06/20 17:26:01
endtime=2025/06/20 17:26:02
result=

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力=0;充气时间=0.2s;平衡时间=0.2s;检测时间=0.2s;排气时间=0.2s;泄露量=0.0;
totaltime=0.8
starttime=2025/06/20 17:50:53
endtime=2025/06/20 17:50:54
result=fail

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力=0;充气时间=0.2s;平衡时间=0.2s;检测时间=0.2s;排气时间=0.2s;泄露量=0.0;
totaltime=0.8
starttime=2025/06/20 17:53:07
endtime=2025/06/20 17:53:07
result=fail

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力=0;充气时间=0.2s;平衡时间=0.2s;检测时间=0.2s;排气时间=0.2s;泄露量=0.0;
totaltime=0.8
starttime=2025/06/20 17:53:07
endtime=2025/06/20 17:53:07
result=

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力=0;充气时间=0.2s;平衡时间=0.2s;检测时间=0.2s;排气时间=0.2s;当前压差=0;泄露量=0.0;
totaltime=0.8
starttime=2025/06/21 08:42:29
endtime=2025/06/21 08:42:30
result=fail

View File

@@ -1,8 +0,0 @@
[Info]
sn=N2479000099
type=
message=检测压力=0;充气时间=0.2s;平衡时间=0.2s;检测时间=0.2s;排气时间=0.2s;当前压差=0;泄露量=0.0;
totaltime=0.8
starttime=2025/06/21 08:42:29
endtime=2025/06/21 08:42:30
result=fail

View File

@@ -1,8 +0,0 @@
[Info]
sn=
type=
message=检测压力=0;充气时间=0s;平衡时间=0s;检测时间=0s;排气时间=0s;当前压差=0;泄露量=0.0;
totaltime=0
starttime=2025/06/20 18:22:04
endtime=2025/06/20 18:22:04
result=fail

View File

@@ -1,8 +0,0 @@
[Info]
sn=
type=
message=检测压力=0;充气时间=0s;平衡时间=0s;检测时间=0s;排气时间=0s;当前压差=0;泄露量=0.0;
totaltime=0
starttime=2025/06/20 18:22:04
endtime=2025/06/20 18:22:04
result=fail

View File

@@ -1068,3 +1068,48 @@ E:\platform\LL-28\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.CoreCompileInputs.
E:\platform\LL-28\C-Windows-1\obj\Debug\C-Window.5B87B986.Up2Date E:\platform\LL-28\C-Windows-1\obj\Debug\C-Window.5B87B986.Up2Date
E:\platform\LL-28\C-Windows-1\obj\Debug\LL18-Control.exe E:\platform\LL-28\C-Windows-1\obj\Debug\LL18-Control.exe
E:\platform\LL-28\C-Windows-1\obj\Debug\LL18-Control.pdb E:\platform\LL-28\C-Windows-1\obj\Debug\LL18-Control.pdb
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\LL18-Control.exe.config
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\LL18-Control.exe
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\LL18-Control.pdb
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\System.Buffers.dll
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\System.Numerics.Vectors.dll
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\System.Security.Principal.Windows.dll
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\LL18-Control.exe.config
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.Activationcode.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.Config.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.Form1.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.Form2.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.Form3.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.Form4.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.LogOn.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.MESConfig.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.MyGroupBox.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.PortSetting.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.Properties.Resources.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.Save.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.TestPara.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C_Windows_1.UserPassword.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.GenerateResource.cache
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.CoreCompileInputs.cache
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.CopyComplete
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\LL18-Control.exe
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\LL18-Control.pdb
E:\platform\LL-28_dehuida\C-Windows-1\obj\Debug\C-Windows-LL18.csproj.AssemblyReference.cache
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\BouncyCastle.Cryptography.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\Enums.NET.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\HslCommunication.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\ICSharpCode.SharpZipLib.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\MathNet.Numerics.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\Microsoft.IO.RecyclableMemoryStream.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\Newtonsoft.Json.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\NPOI.Core.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\NPOI.OOXML.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\NPOI.OpenXml4Net.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\NPOI.OpenXmlFormats.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\SixLabors.Fonts.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\SixLabors.ImageSharp.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\System.Memory.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\System.Security.AccessControl.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\System.Security.Cryptography.Xml.xml
E:\platform\LL-28_dehuida\C-Windows-1\bin\Debug\System.Text.Encoding.CodePages.xml

View File

@@ -17,3 +17,20 @@ E:\platform\LL-28\C-Windows-1\obj\Release\C_Windows_1.TestPara.resources
E:\platform\LL-28\C-Windows-1\obj\Release\C_Windows_1.UserPassword.resources E:\platform\LL-28\C-Windows-1\obj\Release\C_Windows_1.UserPassword.resources
E:\platform\LL-28\C-Windows-1\obj\Release\C-Windows-LL18.csproj.GenerateResource.cache E:\platform\LL-28\C-Windows-1\obj\Release\C-Windows-LL18.csproj.GenerateResource.cache
E:\platform\LL-28\C-Windows-1\obj\Release\C-Windows-LL18.csproj.CoreCompileInputs.cache E:\platform\LL-28\C-Windows-1\obj\Release\C-Windows-LL18.csproj.CoreCompileInputs.cache
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C-Windows-LL18.csproj.AssemblyReference.cache
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.Activationcode.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.Config.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.Form1.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.Form2.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.Form3.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.Form4.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.LogOn.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.MESConfig.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.MyGroupBox.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.PortSetting.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.Properties.Resources.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.Save.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.TestPara.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C_Windows_1.UserPassword.resources
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C-Windows-LL18.csproj.GenerateResource.cache
E:\platform\LL-28_dehuida\C-Windows-1\obj\Release\C-Windows-LL18.csproj.CoreCompileInputs.cache