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(); } } }
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(); } }