25112102 调整表格表头按客户需求来

This commit is contained in:
moxiliang
2025-11-21 10:47:58 +08:00
parent a1ea8fb655
commit b5f208b3ca
648 changed files with 0 additions and 1546311 deletions

View File

@@ -1,105 +0,0 @@
using Microsoft.Win32;
using System;
using System.Windows.Forms;
namespace C_Windows_1
{
public partial class Config : Form
{
public Config()
{
InitializeComponent();
}
private void Config_Load(object sender, EventArgs e)
{
Read();
}
private void Use_Set_Click(object sender, EventArgs e)
{
Set();
Form1.f1.Station.Text = Station.Text;
// Form1.f1.Code_Head.Text = Code_Head.Text;
Form1.f1.tb_CodeLength.Text = CodeLength.Text;
Form1.f1.CodeLength.Text = CodeLength.Text;
this.Close();
}
//写入端口参数
private void Set()
{
RegistryKey regName;
regName = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\PMD\\1.0\\User-LL18-Set", true);
if (regName is null)
{
regName = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\PMD\\1.0\\User-LL18-Set");
}
regName.SetValue("station", Station.Text);
// regName.SetValue("codehead", Code_Head.Text);
regName.SetValue("codelength", CodeLength.Text);
regName.SetValue("codelengthcheck", codelengthcheck.Checked);
regName.Close();
}
//读出站号、条码长度、通道数等参数
private void Read()
{
RegistryKey regName;
regName = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\PMD\\1.0\\User-LL18-Set", true);
if (regName is null)
{
regName = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\PMD\\1.0\\User-LL18-Set");
}
regName.OpenSubKey("User");
if (regName.GetValue("station") is null)
{
Station.Text = "01";
}
else
{
Station.Text = regName.GetValue("station").ToString();
}
if (regName.GetValue("codelength") is null)
{
CodeLength.Text = "13";
}
else
{
CodeLength.Text = regName.GetValue("codelength").ToString();
}
if (regName.GetValue("codelengthcheck") is null)
{
codelengthcheck.Checked = true;
}
else
{
codelengthcheck.Checked = Convert.ToBoolean(regName.GetValue("codelengthcheck").ToString());
}
regName.Close();
}
}
}