예제 #1
0
        public void Application_Startup(object sender, StartupEventArgs e)
        {
            //C'est ici, dans la méthode Application_Startup, qu'on instancie nos objets Dbal et Dao

            mydbal             = new Dbal("Escp_Game");
            thedaoclients      = new DaoClient(mydbal);
            thedaotheme        = new DaoTheme(mydbal);
            thedaoavis         = new DaoAvis(mydbal, thedaoclients, thedaotheme);
            thedaoobstacles    = new DaoObstacle(mydbal, thedaotheme);
            thedaoville        = new DaoVille(mydbal);
            thedaosalles       = new DaoSalle(mydbal, thedaoville, thedaotheme);
            thedaoutilisateurs = new DaoUtilisateur(mydbal, thedaoville);
            thedaoreservation  = new DaoReservation(mydbal, thedaoclients, thedaosalles, thedaoutilisateurs, thedaotheme);
            thedaoplacement    = new DaoPlacement_Obst(mydbal, thedaoreservation, thedaoobstacles);
            thedaoheure        = new DaoHeure(mydbal);



            // Create the startup window
            //là, on lance la fenêtre souhaitée en instanciant la classe de notre fenêtre
            directeur wnd = new directeur(thedaoavis, thedaoclients, thedaoobstacles, thedaoplacement, thedaoreservation, thedaosalles, thedaotheme, thedaoutilisateurs, thedaoville, thedaoheure);            //et on utilise la méthode Show() de notre objet fenêtre pour afficher la fenêtre

            //exemple: MainWindow lafenetre = new MainWindow(); (et on y passe en paramètre Dbal et Dao au besoin)
            wnd.Show();
        }
예제 #2
0
 public directeur(DaoAvis thedaoavis, DaoClient thedaoclient, DaoObstacle thedaoobstacle, DaoPlacement_Obst thedaoPlacement_Obst, DaoReservation theDaoReservation, DaoSalle thedaosalle, DaoTheme thedaotheme, DaoUtilisateur thedaoutilisateur, DaoVille thedaoville, DaoHeure thedaoheure)
 {
     InitializeComponent();
     Globale.DataContext = new viewModel.viewModelSalles(thedaoavis, thedaoclient, thedaoobstacle, thedaoPlacement_Obst, theDaoReservation, thedaosalle, thedaotheme, thedaoutilisateur, thedaoville, thedaoheure);
     grid1.Visibility    = Visibility.Hidden;
     grid2.Visibility    = Visibility.Hidden;
     grid3.Visibility    = Visibility.Hidden;
     grid4.Visibility    = Visibility.Hidden;
     HOME.Visibility     = Visibility.Visible;
 }