예제 #1
0
 public Form1()
 {
     InitializeComponent();
     gestionSport = new GestionSport(Constantes.CONNECTION_STRING);
     try
     {
         BDCreateur.CreateDatabase(gestionSport.ConnectionString);
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
     }
     LireTestUnitaire();
 }
예제 #2
0
        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());
        }