static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Forms.LoginForm loginForm = new Forms.LoginForm();

            if (loginForm.ShowDialog() == DialogResult.OK)
            {
                Application.Run(new Forms.MainForm());
            }
        }
Exemple #2
0
        static void Main()
        {
            //Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Display LoginForm, then MainForm if Login = True
            Forms.LoginForm loginF = new Forms.LoginForm();

            if (loginF.ShowDialog() == DialogResult.OK)
            {
                Application.Run(new Forms.LoginForm());
            }
            else
            {
                Application.Exit();
            }
        }