using System;
using System.Windows.Forms;

namespace АвтотранспортноеПредприятие
{
    internal static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using (var loginForm = new FormLogin())
            {
                if (loginForm.ShowDialog() == DialogResult.OK)
                {
                    Application.Run(new FormMain(loginForm.CurrentUser));
                }
                else
                {
                    Application.Exit();
                }
            }
        }
    }
}