-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
30 lines (27 loc) · 805 Bytes
/
Program.cs
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
using final_programming_project.Forms;
using final_programming_project.Objects;
using final_programming_project.Source;
namespace final_programming_project;
internal static class Program
{
[STAThread]
public static void Main()
{
ApplicationConfiguration.Initialize();
if (SQLManager.SelectAll<User>(TableName.users).Count == 0)
{
SQLManager.RegisterUser("admin", "root", "admin");
SQLManager.RegisterUser("guest", "123", null);
}
bool login;
do
{
login = false;
var user = new LoginForm().Exec();
if (user == null) continue;
MainForm main = new(user);
Application.Run(main);
if (main.Logout) login = true;
} while (login);
}
}