public Form1() { InitializeComponent(); gestionSport = new GestionSport(Constantes.CONNECTION_STRING); try { BDCreateur.CreateDatabase(gestionSport.ConnectionString); } catch (Exception exception) { MessageBox.Show(exception.Message); } LireTestUnitaire(); }
static void Main() { GestionSport gestionSport = new GestionSport(Constantes.CONNECTION_STRING); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); LoginForm loginForm = new LoginForm(gestionSport); loginForm.ShowDialog(); if (loginForm.DialogResult == DialogResult.OK) { Application.Run(new MainForm(gestionSport, loginForm.UtilisateurConnecte)); } //Application.Run(new Form1()); }