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