Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //Create new login page
            Login_Form fLogin = new Login_Form();

            if (fLogin.ShowDialog() == DialogResult.OK) //if login successful
            {
                Application.Run(new MainForm());        //run program
            }
            else
            {
                Application.Exit();
            }
        }
Ejemplo n.º 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Login_Form   fLogin = new Login_Form();
            DialogResult result = fLogin.ShowDialog();

            if (result == DialogResult.OK)
            {
                Application.Run(new MainForm());
            }
            //unimplemented part
            else if (result == DialogResult.Yes)
            {
                //attempt at improving the UI
                Application.Run(new FormUser());
            }
            else
            {
                Application.Exit();
            }
        }