1.初始化项目。保险起见bin目录完整提交 2.基于现场代码为调整过的初始项目(此次提交还未解决代码差异问题)

This commit is contained in:
龚记林
2026-08-19 11:14:30 +08:00
parent b820c71956
commit 2b30644d28
382 changed files with 140652 additions and 1 deletions
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace AGVSystem
{
public partial class logon : Form
{
public logon()
{
InitializeComponent();
Cls.Param.UserName = Cls.FileRW.ReadIniValue("UserName", "Name", Application.StartupPath + @"\info.ini");
Cls.Param.Password = Cls.FileRW.ReadIniValue("PassWord", "PassWord", Application.StartupPath + @"\info.ini");
txtName.Text = Cls.Param.UserName_temp;
txtPW.Text = Cls.Param.Password_temp;
if (txtName.Text != "")
button1.Text = "退出管理员";
}
private void button1_Click(object sender, EventArgs e)
{
if (button1.Text == "退出管理员")
{
Cls.Param.UserName_temp = "";
Cls.Param.Password_temp = "";
mainfrm.toolStripStatusLabel.Text = "当前用户:匿名登录";
this.Close();
}
else
{
if (Cls.Param.UserName == txtName.Text.Trim() && Cls.Param.Password == txtPW.Text.Trim())
{
Cls.Param.UserName_temp = Cls.Param.UserName;
Cls.Param.Password_temp = Cls.Param.Password;
mainfrm.toolStripStatusLabel.Text = "当前用户:管理员";
this.Close();
}
}
}
private void txtPW_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
if (txtName.Text != "" && txtPW.Text == "")
{
button1_Click(null,null);
}
}
}
private void log_Load(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Normal;
}
}
}