private void Application_Startup(object sender, StartupEventArgs e) { thedbal = new Dbal("dsfootamericain"); thedaopays = new DaoPays(thedbal); thedaoposte = new daoPoste(thedbal); thedaojoueur = new daoJoueur(thedbal, thedaopays, thedaoposte); thedaoequipe = new daoEquipe(thedbal); MainWindow wnd = new MainWindow(thedaopays, thedaojoueur, thedaoequipe, thedaoposte); wnd.Show(); }
private void Application_Startup(object sender, StartupEventArgs e) { //C'est ici, dans la méthode Application_Startup, qu'on instancie nos objets Dbal et Dao thedbal = new DBAL("dsfootamericain"); thedaopays = new daoPays(thedbal); thedaoposte = new daoPoste(thedbal); thedaojoueur = new daoJoueur(thedbal, thedaopays, thedaoposte); thedaoequipe = new daoEquipe(thedbal); // Create the startup window //là, on lance la fenêtre souhaitée en instanciant la classe de notre fenêtre MainWindow wnd = new MainWindow(thedaoequipe, thedaojoueur, thedaopays, thedaoposte); //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(); }
public MainWindow(daoEquipe thedaoequipe, daoJoueur thedaojoueur, daoPays thedaopays, daoPoste thedaoposte) { InitializeComponent(); Globale.DataContext = new ClubfootApp.viewModel.viewModelJoueur(thedaoequipe, thedaojoueur, thedaopays, thedaoposte); }
public MainWindow(DaoPays unDaoPays, daoJoueur unDaoJoueur, daoEquipe unDaoEquipe, daoPoste unDaoPoste) { InitializeComponent(); Globale.DataContext = new viewModel.viewModelFoot(unDaoPays, unDaoEquipe, unDaoJoueur, unDaoPoste); }