DepartmentProject/DepartmentPortal/DepartmentPortalDesctop/Program.cs

35 lines
896 B
C#
Raw Normal View History

using DatabaseCore;
using ModuleTools.BusinessLogics;
using ModuleTools.Interfaces;
using System;
using System.Windows.Forms;
namespace DepartmentPortalDesctop
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
DependencyManager.Instance.RegisterType<ISecurityManager, SecurityManager>();
DependencyManager.InitDependency();
var securityManager = DependencyManager.Instance.Resolve<ISecurityManager>();
securityManager.CheckStartDataSource();
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var form = new FormEnter();
if (form.ShowDialog() == DialogResult.OK && securityManager.IsAuth)
{
Application.Run(DependencyManager.Instance.Resolve<FormMain>());
}
}
}
}