36 lines
955 B
C#
36 lines
955 B
C#
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();
|
|
|
|
var securityManager = UnityContainerConfigurator.Resolve<ISecurityManager>();
|
|
securityManager.CheckStartDataSource();
|
|
|
|
Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
var form = new FormEnter();
|
|
|
|
if (form.ShowDialog() == DialogResult.OK && UserManager.GetInstance.IsAuth)
|
|
{
|
|
Application.Run(UnityContainerConfigurator.Resolve<FormMain>());
|
|
}
|
|
}
|
|
}
|
|
} |