2021-03-26 20:09:52 +04:00
|
|
|
using DatabaseCore;
|
|
|
|
using ModelTools.BusinessLogics;
|
|
|
|
using ModelTools.Interfaces;
|
|
|
|
using SecurityBusinessLogic.BusinessLogics;
|
|
|
|
using System;
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
namespace DepartmentPortalDesctop
|
|
|
|
{
|
|
|
|
static class Program
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// The main entry point for the application.
|
|
|
|
/// </summary>
|
|
|
|
[STAThread]
|
|
|
|
static void Main()
|
|
|
|
{
|
|
|
|
UnityContainerConfigurator.PublishService<ISecurityManager, SecurityManager>();
|
|
|
|
UnityContainerConfigurator.InitServices();
|
|
|
|
|
2021-03-28 00:15:01 +04:00
|
|
|
var securityManager = UnityContainerConfigurator.Resolve<ISecurityManager>();
|
|
|
|
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
|
|
|
{
|
|
|
|
Application.Run(UnityContainerConfigurator.Resolve<FormMain>());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|