Files
FG2608061/反编译CODE/华晓AGV管理系统/logon.cs
T

72 lines
1.9 KiB
C#

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using AGVSystem.Cls;
namespace AGVSystem
{
// Token: 0x02000018 RID: 24
public partial class logon : Form
{
// Token: 0x06000136 RID: 310 RVA: 0x00037CEC File Offset: 0x00035EEC
public logon()
{
this.InitializeComponent();
Param.UserName = FileRW.ReadIniValue("UserName", "Name", Application.StartupPath + "\\info.ini");
Param.Password = FileRW.ReadIniValue("PassWord", "PassWord", Application.StartupPath + "\\info.ini");
this.txtName.Text = Param.UserName_temp;
this.txtPW.Text = Param.Password_temp;
bool flag = this.txtName.Text != "";
if (flag)
{
this.button1.Text = "退出管理员";
}
}
// Token: 0x06000137 RID: 311 RVA: 0x00037DA4 File Offset: 0x00035FA4
private void button1_Click(object sender, EventArgs e)
{
bool flag = this.button1.Text == "退出管理员";
if (flag)
{
Param.UserName_temp = "";
Param.Password_temp = "";
mainfrm.toolStripStatusLabel.Text = "当前用户:匿名登录";
base.Close();
}
else
{
bool flag2 = Param.UserName == this.txtName.Text.Trim() && Param.Password == this.txtPW.Text.Trim();
if (flag2)
{
Param.UserName_temp = Param.UserName;
Param.Password_temp = Param.Password;
mainfrm.toolStripStatusLabel.Text = "当前用户:管理员";
base.Close();
}
}
}
// Token: 0x06000138 RID: 312 RVA: 0x00037E68 File Offset: 0x00036068
private void txtPW_KeyDown(object sender, KeyEventArgs e)
{
bool flag = e.KeyCode == Keys.Return;
if (flag)
{
bool flag2 = this.txtName.Text != "" && this.txtPW.Text == "";
if (flag2)
{
this.button1_Click(null, null);
}
}
}
// Token: 0x06000139 RID: 313 RVA: 0x00037EC4 File Offset: 0x000360C4
private void log_Load(object sender, EventArgs e)
{
base.WindowState = FormWindowState.Normal;
}
}
}