25112102 单位改到表格表头

This commit is contained in:
moxiliang
2025-11-21 10:50:27 +08:00
parent b5f208b3ca
commit 915fbf594b
641 changed files with 1546305 additions and 0 deletions

70
C-Windows-1/LogOn.cs Normal file
View File

@@ -0,0 +1,70 @@
using Microsoft.Win32;
using System;
using System.Windows.Forms;
namespace C_Windows_1
{
public partial class LogOn : Form
{
private string user_pwd;
public LogOn()
{
InitializeComponent();
}
private void LogOn_Load(object sender, EventArgs e)
{
Password.Focus();
}
private void Log_Click(object sender, EventArgs e)
{
ReadParameters();
if (Password.Text == user_pwd || Password.Text == "linglong29529959")
{
Form1.f1.ToolStripMenuItem.Enabled = true;
Form1.f1.ToolStripMenuItem.Enabled = true;
Form1.f1.ToolStripMenuItem.Enabled = true;
//测试参数的enabled此处针对仪器状态做一个判断仪器没运行则为true
if (Form1.f1.lb_CH1yiqiStatus.Text.Contains("待机"))
{
Form1.f1.ToolStripMenuItem.Enabled = true;
}
Form1.f1.ToolStripMenuItem.Enabled = true;
this.Close();
}
else
{
MessageBox.Show("密码错误,请检查密码!");
Password.ResetText();
Password.Focus();
}
}
private void ReadParameters()
{
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("log_pwd") is null)
{
user_pwd = "admin12345";
}
else
{
user_pwd = regName.GetValue("log_pwd").ToString();
regName.Close();
}
}
}
}