UserLoginWindow.cs
898 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using BLL;
using System;
using System.Windows.Forms;
namespace SmartScan
{
public static class UserLoginWindow
{
public static bool Show()
{
if (BLL.Config.Backgrounder) //后台模式不需要登录
return true;
if (BLLCommon.config.EnabledUserLogin)
{
FrmUsersLogin frm = new();
if (frm.ShowDialog() == DialogResult.OK)
{
return true;
}
else
{
Model.LogNet.log.Info("=====退出登录=====");
return false;
}
}
else
{
BLLCommon.config.UserName = "None user";
BLLCommon.config.UserLevel = Model.UserLevel.Admin;
return true;
}
}
}
}