2021-03-26 20:09:52 +04:00
|
|
|
using DatabaseCore;
|
2021-03-28 19:15:55 +04:00
|
|
|
using ModuleTools.BusinessLogics;
|
|
|
|
using ModuleTools.Interfaces;
|
2021-03-26 20:09:52 +04:00
|
|
|
using System;
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
namespace DepartmentPortalDesctop
|
|
|
|
{
|
|
|
|
static class Program
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// The main entry point for the application.
|
|
|
|
/// </summary>
|
|
|
|
[STAThread]
|
|
|
|
static void Main()
|
|
|
|
{
|
2021-03-28 19:48:15 +04:00
|
|
|
DependencyManager.Instance.RegisterType<ISecurityManager, SecurityManager>();
|
|
|
|
DependencyManager.InitDependency();
|
2021-03-26 20:09:52 +04:00
|
|
|
|
2021-03-28 19:48:15 +04:00
|
|
|
var securityManager = DependencyManager.Instance.Resolve<ISecurityManager>();
|
2021-03-28 00:15:01 +04:00
|
|
|
securityManager.CheckStartDataSource();
|
|
|
|
|
2021-03-26 20:09:52 +04:00
|
|
|
Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
|
|
|
Application.EnableVisualStyles();
|
|
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
|
|
|
|
var form = new FormEnter();
|
|
|
|
|
2021-03-28 10:23:26 +04:00
|
|
|
if (form.ShowDialog() == DialogResult.OK && securityManager.IsAuth)
|
2021-03-26 20:09:52 +04:00
|
|
|
{
|
2021-03-28 19:48:15 +04:00
|
|
|
Application.Run(DependencyManager.Instance.Resolve<FormMain>());
|
2021-03-26 20:09:52 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|