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(); }
// COMMANDES #endregion #region Constructeur public ViewModelAvis(DaoTheme daoTheme, DaoAvis daoAvis) { // DAO _daoTheme = daoTheme; _daoAvis = daoAvis; // AFFICHAGE FullAvis = ""; PseudoJoueur = "Joueur : "; DateAvis = "Date : "; // LISTES _listAvis = new ObservableCollection <Avis>(); ListThemes = new ObservableCollection <Theme>(_daoTheme.GetAllTheme()); }
private void Application_Startup(object sender, StartupEventArgs e) { mydbal = new Dbal("Escp_Game"); theDaoAvis = new DaoAvis(mydbal, theDaoClient, theDaoTheme); theDaoClient = new DaoClient(mydbal); theDaoObstacle = new DaoObstacle(mydbal, theDaoTheme); theDaoPObstacle = new DaoPlacement_Obst(mydbal, theDaoReservation, theDaoObstacle); theDaoReservation = new DaoReservation(mydbal, theDaoClient, theDaoSalle, theDaoUtilisateur, theDaoTheme); theDaoSalle = new DaoSalle(mydbal, theDaoVille, theDaoTheme); theDaoTheme = new DaoTheme(mydbal); theDaoTransaction = new DaoTransaction(mydbal, theDaoClient, theDaoReservation); theDaoUtilisateur = new DaoUtilisateur(mydbal, theDaoVille); theDaoVille = new DaoVille(mydbal); }
private void Application_Startup(object sender, StartupEventArgs e) { mydbal = new Dbal("escp_Game"); theDaoClient = new DaoClient(mydbal); theDaoVille = new DaoVille(mydbal); theDaoTheme = new DaoTheme(mydbal); theDaoUtilisateur = new DaoUtilisateur(mydbal, theDaoVille); theDaoSalle = new DaoSalle(mydbal, theDaoVille, theDaoTheme); theDaoReservation = new DaoReservation(mydbal, theDaoClient, theDaoSalle, theDaoUtilisateur, theDaoTheme); theDaoTransaction = new DaoTransaction(mydbal, theDaoClient, theDaoReservation); //bool res = false; Connexion wndco = new Connexion(theDaoClient, theDaoTransaction, theDaoUtilisateur, theDaoVille); wndco.Show(); }
public ViewModelGestion(DaoSite daoSite, DaoSalle daoSalle, DaoHoraire daoHoraire, DaoTheme daoTheme) { // DAO _daoSite = daoSite; _daoSalle = daoSalle; _daoHoraire = daoHoraire; _daoTheme = daoTheme; // LISTES _listSalles = new ObservableCollection <Salle>(); _listThemes = new ObservableCollection <Theme>(_daoTheme.GetAllTheme()); ListSites = new ObservableCollection <Site>(_daoSite.GetAllSite()); _listHoraires = new ObservableCollection <Horaire>(_daoHoraire.GetAllHoraires()); // SELECTIONS _selectedSite = _listSites.First(); _selectedSalle = _listSalles.First(); _selectedHoraire = new Horaire(); _selectedHoraireSite = new Horaire(); _dateNewDate = new DateTime(); _nameNewTheme = ""; }
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; }