Diplom_O/Program.cs
2024-09-20 06:53:52 +03:00

106 lines
2.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using Diplom_O.DataBase;
namespace Diplom_O
{
static class Program
{
public static bool IsDebug = false;
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
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;
}
}
}
}
}