按照客户要求将excel导出文件保存为一个条码一条记录,名称为SN_结果_时间.xslx

This commit is contained in:
LL
2025-11-14 17:27:29 +08:00
commit 883060d140
79 changed files with 166110 additions and 0 deletions

61
SLZ_4/ConfigDevicePort.cs Normal file
View File

@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SLZ_4
{
public partial class ConfigDevicePort : Form
{
public ConfigDevicePort()
{
InitializeComponent();
refreshPort();
}
public void refreshPort()
{
CodePort.Items.Clear();
string[] ports = System.IO.Ports.SerialPort.GetPortNames();
CodePort.Items.AddRange(ports);
}
private void CodeCon_Click(object sender, EventArgs e)
{
FormMain.form.updateDevice(CodePort.Text, int.Parse(CodeBaud.Text));
Config.saveDevParam(0);
FormMain.form.addDevObj(0);
}
private void CodeRefresh_Click(object sender, EventArgs e)
{
refreshPort();
}
private void CodeBreak_Click(object sender, EventArgs e)
{
FormMain.form.deleteDevObj(0);
}
public void showDevInfo()
{
CodePort.Text = FormMain.form.arrDevParam[0].sDevAddr;
CodeBaud.Text = FormMain.form.arrDevParam[0].iPort.ToString();
if (FormMain.form.arrDevObj[0] != null)
{
CodeIsComm.Text = FormMain.form.arrDevObj[0].bStatus ? "已连接" : "未连接";
CodeIsComm.BackColor = FormMain.form.arrDevObj[0].bStatus ? Color.Green : Color.Red;
}
else
{
CodeIsComm.Text = "未配置";
}
}
}
}