Example #1
0
        static void Main()
        {
            DialogResult result;


            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            using (var mainScreen = new EmptyView())
            {
                mainScreen.Show();
                LoginScreen loginScreen = new LoginScreen();
                result = loginScreen.ShowDialog();
            }
            SplashRef = new Splash();
            SplashRef.Show();

            if (result == DialogResult.OK) // bloc non executé si on clique sur "Annuler"
            {
                if ((user.Profile == Profile.Admin) || (user.Profile == Profile.Agent))
                {
                    ViewFactory.getViewInstance(user.Profile).Show();
                }
            }
        }
Example #2
0
        static void Main()
        {
            DialogResult result ;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

             using (var mainScreen = new EmptyView())
             {
            mainScreen.Show();
            LoginScreen loginScreen = new LoginScreen();
            result = loginScreen.ShowDialog();
              }
            SplashRef = new Splash();
            SplashRef.Show();

            if (result == DialogResult.OK)  // bloc non executé si on clique sur "Annuler"
            {
            if((user.Profile == Profile.Admin) || ( user.Profile == Profile.Agent))
            ViewFactory.getViewInstance(user.Profile).Show();
            }
        }