Diplom_O/Program.cs

106 lines
2.2 KiB
C#
Raw Normal View History

2021-07-21 16:57:47 +05:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
2024-09-20 08:53:52 +05:00
using Diplom_O.DataBase;
2021-07-21 16:57:47 +05:00
namespace Diplom_O
{
static class Program
{
2024-09-20 08:53:52 +05:00
public static bool IsDebug = false;
2021-07-21 16:57:47 +05:00
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
2024-09-20 08:53:52 +05:00
int nextForm = 0;
FuncDB.InitDB();
{
var form = new LoginForm();
Application.Run(form);
if (form.isCanceled)
return;
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
while (nextForm >= 0 && nextForm < FormArray.formName.Length)
{
switch (nextForm)
{
case 0:
{
var form = new ShtatForm();
Application.Run(form);
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
break;
case 1:
{
var form = new ChelForm();
Application.Run(form);
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
break;
case 2:
{
var form = new RabForm();
Application.Run(form);
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
break;
case 3:
{
var form = new StajForm();
Application.Run(form);
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
break;
case 4:
{
var form = new LearnForm();
Application.Run(form);
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
break;
case 5:
{
var form = new OtpForm();
Application.Run(form);
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
break;
case 6:
{
var form = new ChildForm();
Application.Run(form);
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
break;
case 7:
{
var form = new SettingsForm();
Application.Run(form);
nextForm = form.GetNextForm();
form.SetNextForm(-1);
}
break;
}
}
2021-07-21 16:57:47 +05:00
}
}
2024-09-20 08:53:52 +05:00
2021-07-21 16:57:47 +05:00
}