增加Engineer的用户

Eight
lhiven 7 months ago
parent a716d353ff
commit 90d26e98eb

@ -9,8 +9,9 @@ namespace Rs.MotionPlat.Commom
{ {
public enum EUserLevel public enum EUserLevel
{ {
Vender,
Op, Op,
Engineer,
Vender,
Admin Admin
} }
public class GlobalUser public class GlobalUser

@ -50,9 +50,24 @@ namespace Rs.MotionPlat
txtPassword.Text = ""; txtPassword.Text = "";
} }
} }
if (username == "Engineer")
{
if (userpwd == "2")
{
OnloginSuccessEvent?.Invoke(username);
GlobalUser.UserLevel = EUserLevel.Engineer;
GlobalUser.UserName = username;
this.Close();
}
else
{
Msgbox.ShowTipDialog(EButtonType.Ok, "userpwd error,please input again");
txtPassword.Text = "";
}
}
else if (username == "Admin") else if (username == "Admin")
{ {
if (userpwd == "lhiven@123") if (userpwd == "lhiven")
{ {
OnloginSuccessEvent?.Invoke(username); OnloginSuccessEvent?.Invoke(username);
GlobalUser.UserLevel = EUserLevel.Admin; GlobalUser.UserLevel = EUserLevel.Admin;

@ -56,8 +56,9 @@
this.cboxUsers.FormattingEnabled = true; this.cboxUsers.FormattingEnabled = true;
this.cboxUsers.Items.AddRange(new object[] { this.cboxUsers.Items.AddRange(new object[] {
"Op", "Op",
"Admin", "Engineer",
"Vender"}); "Vender",
"Admin"});
this.cboxUsers.Location = new System.Drawing.Point(135, 77); this.cboxUsers.Location = new System.Drawing.Point(135, 77);
this.cboxUsers.Name = "cboxUsers"; this.cboxUsers.Name = "cboxUsers";
this.cboxUsers.Size = new System.Drawing.Size(172, 28); this.cboxUsers.Size = new System.Drawing.Size(172, 28);

Loading…
Cancel
Save