コード例 #1
0
ファイル: App.xaml.cs プロジェクト: hugo749/PPE3-master
        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
ファイル: Program.cs プロジェクト: hugoCOMBET/PPE3-SLAM
        static void Main(string[] args)
        {
            Dbal monDbal = new Dbal("LSRGames");

            monClient   = new Clients();
            myDaoClient = new DAOclients(monDbal);
        }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: SIO2-PPE/EGCManager
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            Dbal dbal = new Dbal("ppe3_mmd");

            Login wnd = new Login(dbal);

            wnd.Show();
        }
コード例 #4
0
ファイル: App.xaml.cs プロジェクト: SIO2-PPE/EGCManager
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            Dbal thedbal = new Dbal("PPE3_MMD");


            Login wnd = new Login(thedbal);

            wnd.Show();
        }
コード例 #5
0
 public AvisClients(Dbal dbal)
 {
     InitializeComponent();
     _dbal = dbal;
     MainGrid.DataContext = new viewModel.ViewModelAvis(
         new DaoTheme(dbal),
         new DaoAvis(dbal)
         );
 }
コード例 #6
0
ファイル: Gestion.xaml.cs プロジェクト: SIO2-PPE/EGCManager
 public Gestion(Dbal dbal)
 {
     InitializeComponent();
     _dbal = dbal;
     MainGrid.DataContext = new viewModel.ViewModelGestion(
         new DaoSite(dbal),
         new DaoSalle(dbal),
         new DaoHoraire(dbal),
         new DaoTheme(dbal)
         );
 }
コード例 #7
0
 public Facturation(Dbal dbal, Client leClient)
 {
     _client     = leClient;
     _dbal       = dbal;
     _daoClient  = new DaoClient(dbal);
     _daoFacture = new DaoFacture(dbal);
     InitializeComponent();
     Box_Nom.Text        = leClient.Nom;
     Box_Prenom.Text     = leClient.Prenom;
     Selection_Date.Text = DateTime.Now.ToString("d");
 }
コード例 #8
0
        static void Main(string[] args)
        {
            Dbal monDbal = new Dbal("LSRGames");

            monClient   = new Clients();
            myDaoClient = new DAOclients(monDbal);

            matransaction    = new Transactions();
            myDaoTransaction = new DAOtransactions(monDbal, myDaoClient);


            // select all transaction :
            //List<Transactions> lesTransaction = myDaoTransaction.SelectAll();

            //foreach (Transactions T in lesTransaction)
            //{
            //    Console.WriteLine(T.getIdTransactions());
            //}

            //select by id transaction :
            //Console.WriteLine(myDaoTransaction.SelectById(1).getMontantTransaction());

            //select byid client:
            //Console.WriteLine(myDaoClient.SelectById(1).getEmailClient());
            //select byName name:
            //Console.WriteLine(myDaoClient.SelectByName("GROUSSAUD").getEmailClient());

            //List<Clients> lesClients = myDaoClient.SelectAll();

            //foreach (Clients C in lesClients)
            //{
            //    Console.WriteLine(C.getAdresseClient());
            //}

            DateTime uneDate = new DateTime(2000 / 01 / 01);

            Clients monClients = new Clients(4, "julien", "gilbert", "ffef", "sonadresse", uneDate, "client@mail", "0452326895", 60);

            //myDaoClient.Insert(monClients);



            //myDaoClient.Update(monClients);
            myDaoClient.Delete(monClients);

            List <Clients> lesClients = myDaoClient.SelectAll();

            foreach (Clients C in lesClients)
            {
                Console.WriteLine(C.getAdresseClient());
            }

            Console.ReadKey();
        }
コード例 #9
0
        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();
        }
コード例 #10
0
        static void Main(string[] args)
        {
            mydbal     = new Dbal("dsfootamericain");
            myPoste    = new Poste();
            myDaoPoste = new DaoPoste(mydbal);

            myPays    = new Pays();
            myDaoPays = new DaoPays(mydbal);

            myJoueur    = new Joueur();
            myDaoJoueur = new DaoJoueur(mydbal, myDaoPays, myDaoPoste);

            myEquipe    = new Equipe();
            myDaoEquipe = new DaoEquipe(mydbal, myDaoJoueur);


            List <Poste> listPost = myDaoPoste.SelectAll();

            foreach (Poste f in listPost)
            {
                Console.WriteLine(f.Nom);
            }

            Console.WriteLine("--------------------------");

            List <Joueur> listJoueur = myDaoJoueur.SelectAll();

            foreach (Joueur f in listJoueur)
            {
                Console.WriteLine(f.Nom);
            }


            Console.WriteLine("--------------------------");

            List <Equipe> ListEquipe = myDaoEquipe.SelectAll();

            foreach (Equipe f in ListEquipe)
            {
                Console.WriteLine(f.Nom);
            }

            Console.WriteLine("--------------------------");

            Poste unPoste = myDaoPoste.SelectById(1);

            Console.WriteLine(unPoste.Nom);

            Joueur unJoueur = myDaoJoueur.SelectById(1);

            Console.WriteLine(unJoueur.Nom);
        }
コード例 #11
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            //Instancier DBAL ET DAO ICI
            mydbal       = new Dbal("dsfootamericain");
            theDaoEquipe = new DaoEquipe(mydbal);
            theDaoPays   = new DaoPays(mydbal);
            theDaoPoste  = new DaoPoste(mydbal);
            theDaoJoueur = new DaoJoueur(mydbal, theDaoPays, theDaoPoste, theDaoEquipe);

            MainWindow wnd = new MainWindow(theDaoEquipe, theDaoJoueur, theDaoPays, theDaoPoste);

            wnd.Show();
        }
コード例 #12
0
        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, theDaoJoueur);
            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();
        }
コード例 #13
0
 public InfosClient(Client leClient, Dbal dbal)
 {
     _client    = leClient;
     _dbal      = dbal;
     _daoClient = new DaoClient(dbal);
     InitializeComponent();
     Box_Nom.Text                = leClient.Nom;
     Box_Prenom.Text             = leClient.Prenom;
     Selection_Date.SelectedDate = leClient.Naissance;
     Box_Email.Text              = leClient.Email;
     Box_Crédits.Text            = leClient.Credit.ToString();
     Box_Numero.Text             = leClient.Tel;
     Box_Adress.Text             = leClient.Adresse;
 }
コード例 #14
0
 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);
 }
コード例 #15
0
 public VueModele(Dbal dbal, DAOxClients dAOxClients, DAOxFonction dAOxFonction, DAOxObstacles dAOxObstacles, DAOxOperateur dAOxOperateur, DAOxOperateurSalle dAOxOperateurSalle, DAOxPartieObstacles dAOxPartieObstacles, DAOxParties dAOxParties, DAOxSalle dAOxSalle, DAOxTheme dAOxTheme, DAOxTransactions dAOxTransactions, DAOxVille dAOxVille)
 {
     _bdd             = dbal;
     _clients         = dAOxClients;
     _fonction        = dAOxFonction;
     _obstacles       = dAOxObstacles;
     _operateur       = dAOxOperateur;
     _operateurSalle  = dAOxOperateurSalle;
     _partieObstacles = dAOxPartieObstacles;
     _parties         = dAOxParties;
     _salle           = dAOxSalle;
     _theme           = dAOxTheme;
     _transactions    = dAOxTransactions;
     _ville           = dAOxVille;
 }
コード例 #16
0
ファイル: App.xaml.cs プロジェクト: hugoCOMBET/PPE-33
        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("LSRGames");
            thedaoClient      = new DAOclients(thedbal);
            thedaoTransaction = new DAOtransactions(thedbal, thedaoClient);

            // Create the startup window
            //là, on lance la fenêtre souhaitée en instanciant la classe de notre fenêtre
            MainWindow wnd = new MainWindow(thedaoClient);

            //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();
        }
コード例 #17
0
        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("club_fromage");
            thedaopays    = new DaoPays(thedbal);
            thedaofromage = new DaoFromage(thedbal, thedaopays);

            // Create the startup window
            //là, on lance la fenêtre souhaitée en instanciant la classe de notre fenêtre
            GestionFromages wnd = new GestionFromages(thedaopays, thedaofromage);

            //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();
        }
コード例 #18
0
        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();
        }
コード例 #19
0
ファイル: App.xaml.cs プロジェクト: SIO2-PPE/EGCManager
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            Dbal        dbal        = new Dbal("ppe3_mmd", "localhost", "root", "5MichelAnnecy");
            DaoFacture  daoFacture  = new DaoFacture(dbal);
            DaoClient   daoClient   = new DaoClient(dbal);
            DaoSite     daoSite     = new DaoSite(dbal);
            DaoSalle    daoSalle    = new DaoSalle(dbal);
            DaoPartie   daoPartie   = new DaoPartie(dbal);
            DaoHoraire  daoHoraire  = new DaoHoraire(dbal);
            DaoObstacle daoObstacle = new DaoObstacle(dbal);
            DaoJoueur   daoJoueur   = new DaoJoueur(dbal);


            MainWindow Wnd = new MainWindow(daoFacture, daoClient, daoSite, daoSalle, daoPartie, daoHoraire, daoObstacle, daoJoueur);

            Wnd.Show();
        }
コード例 #20
0
ファイル: App.xaml.cs プロジェクト: hugoCOMBET/FootAmericain
        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);
            thedaoequipe = new DaoEquipe(thedbal);
            thedaoposte  = new DaoPoste(thedbal);
            thedaojoueur = new DaoJoueur(thedbal, thedaopays, thedaoposte, thedaoequipe);

            // 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();
        }
コード例 #21
0
        static void Main(string[] args)
        {
            mondbal     = new Dbal("dsfootamericain");
            myDaoPays   = new DAOPays(mondbal);
            myDaoPoste  = new DaoPoste(mondbal);
            myDaoJoueur = new DaoJoueur(mondbal, myDaoPays, myDaoPoste, myDaoEquipe);

            #region testPays
            //afficher liste pays
            List <Pays> listPays = myDaoPays.SelectAll();
            foreach (Pays p in listPays)
            {
                Console.WriteLine(p.Nom);
            }

            //afficher nom pays par id

            //Pays myPays = myDaoPays.SelectById(1);
            //Console.WriteLine(myPays.Nom);

            //afficher nom pays par nom

            //Pays myPays = myDaoPays.SelectByName("France");
            //Console.WriteLine(myPays.Nom);

            //insert pays
            //Pays myPays = new Pays(4, "Allemagne");
            //myDaoPays.Insert(myPays);
            #endregion

            #region testJoueur
            List <Joueur> listeJoueur = myDaoJoueur.SelectAll();
            foreach (Joueur j in listeJoueur)
            {
                Console.WriteLine(j.Nom);
            }
            #endregion
        }
コード例 #22
0
 public SelectWindow(Dbal dbal)
 {
     InitializeComponent();
     _dbal = dbal;
 }
コード例 #23
0
        public MainWindow()
        {
            Dbal bdd = new Dbal("192.168.1.16", "egc", "Admin", "Admin");
            //Dbal bdd = new Dbal("172.31.254.186", "egc", "Admin", "Admin");
            DAOxClients         clients         = new DAOxClients(bdd);
            DAOxFonction        fonction        = new DAOxFonction(bdd);
            DAOxObstacles       obstacles       = new DAOxObstacles(bdd);
            DAOxOperateur       operateur       = new DAOxOperateur(bdd);
            DAOxOperateurSalle  operateurSalle  = new DAOxOperateurSalle(bdd);
            DAOxPartieObstacles partieObstacles = new DAOxPartieObstacles(bdd);
            DAOxParties         parties         = new DAOxParties(bdd);
            DAOxSalle           salle           = new DAOxSalle(bdd);
            DAOxTheme           theme           = new DAOxTheme(bdd);
            DAOxTransactions    transactions    = new DAOxTransactions(bdd);
            DAOxVille           ville           = new DAOxVille(bdd);

            List <String> ListHoraire = new List <String> {
                "8h30", "10h00", "11h00", "12h30", "14h00", "15h30", "17h00", "18h30"
            };

            InitializeComponent();

            Selection_jour.SelectedDate = DateTime.Now;

            Load_Planning(salle.SelectAllSalle(), Convert.ToDateTime(Selection_jour.SelectedDate));

            void Load_Planning(List <DTOSalle> listSalles, DateTime date)
            {
                RowDefinition rowDefinition = new RowDefinition();

                rowDefinition.Height = new GridLength(50);
                grid_planning.RowDefinitions.Add(rowDefinition);

                ColumnDefinition columnDefinition = new ColumnDefinition();

                columnDefinition.Width = new GridLength(140);
                grid_planning.ColumnDefinitions.Add(columnDefinition);

                //Création des colonnes du planning
                for (int i = 0; i < ListHoraire.Count(); i++)
                {
                    ColumnDefinition cm = new ColumnDefinition();
                    cm.Width = new GridLength(80);
                    grid_planning.ColumnDefinitions.Add(cm);
                }

                //Création des lignes du planning
                for (int i = 0; i < listSalles.Count(); i++)
                {
                    RowDefinition rw = new RowDefinition();
                    rw.Height = new GridLength(50);
                    grid_planning.RowDefinitions.Add(rw);
                    Label lbl_salle = new Label();
                    lbl_salle.Content  = listSalles[1].GetNom();
                    lbl_salle.Height   = 50;
                    lbl_salle.Width    = 140;
                    lbl_salle.FontSize = 15;
                    lbl_salle.HorizontalContentAlignment = HorizontalAlignment.Center;
                    lbl_salle.VerticalContentAlignment   = VerticalAlignment.Center;
                    Grid.SetRow(lbl_salle, i + 1);
                    Grid.SetColumn(lbl_salle, 0);
                    grid_planning.Children.Add(lbl_salle);
                }


                for (int i = 0; i < listSalles.Count(); i++)
                {
                    for (int j = 0; j < ListHoraire.Count(); j++)
                    {
                        Border br_planning_fin = new Border();
                        br_planning_fin.BorderThickness = new Thickness(1);
                        Grid.SetRow(br_planning_fin, i);
                        Grid.SetColumn(br_planning_fin, 0);
                        grid_planning.Children.Add(br_planning_fin);

                        Border br_planning = new Border();
                        br_planning.BorderThickness = new Thickness(1);
                        Grid.SetRow(br_planning, i);
                        Grid.SetColumn(br_planning, j);
                        grid_planning.Children.Add(br_planning);

                        Label lbl_horaire = new Label();
                        lbl_horaire.Content  = ListHoraire[j];
                        lbl_horaire.Height   = 50;
                        lbl_horaire.Width    = 80;
                        lbl_horaire.FontSize = 15;
                        lbl_horaire.HorizontalContentAlignment = HorizontalAlignment.Center;
                        lbl_horaire.VerticalContentAlignment   = VerticalAlignment.Center;
                        Grid.SetRow(lbl_horaire, 0);
                        Grid.SetColumn(lbl_horaire, j + 1);
                        grid_planning.Children.Add(lbl_horaire);

                        Button btn = new Button();
                        btn.Width      = 140;
                        btn.Height     = 50;
                        btn.FontSize   = 15;
                        btn.Background = Brushes.White;
                        for (int k = 0; k < parties.SelectAllPartie().Count(); k++)
                        {
                            if (parties.SelectAllPartie()[k].GetSalle() == listSalles[k] & parties.SelectAllPartie()[k].GetDateHeure() == date & parties.SelectAllPartie()[k].GetHeure() == ListHoraire[k])
                            {
                                btn.Content = "Réservée";
                            }
                            if (!(parties.SelectAllPartie()[k].GetSalle() == listSalles[k] & parties.SelectAllPartie()[k].GetDateHeure() == date & parties.SelectAllPartie()[k].GetHeure() == ListHoraire[k]))
                            {
                                btn.Content = "Libre";
                            }
                        }
                        if (salle.SelectAllSalle()[i].GetHeureOuverture() == ListHoraire[j] & salle.SelectAllSalle()[i].GetHeureFermeture() == ListHoraire[j])
                        {
                            btn.Content = "Fermée";
                        }
                        btn.VerticalContentAlignment   = VerticalAlignment.Center;
                        btn.HorizontalContentAlignment = HorizontalAlignment.Center;
                        Grid.SetRow(btn, i + 1);
                        Grid.SetColumn(btn, j + 1);

                        grid_planning.Children.Add(btn);
                    }
                }
            }

            Calendrier.DataContext = new VueModele(bdd, clients, fonction, obstacles, operateur, operateurSalle, partieObstacles, parties, salle, theme, transactions, ville);
        }
コード例 #24
0
ファイル: Login.xaml.cs プロジェクト: SIO2-PPE/EGCManager
 public Login(Dbal dbal)
 {
     _dbal = dbal;
     InitializeComponent();
 }
コード例 #25
0
ファイル: Program.cs プロジェクト: SIO2-PPE/EGCManager
        static void Hydrate(DateTime debut, DateTime fin)
        {
            Dbal dbal = new Dbal("ppe3_mmd");

            dbal.DBinit();
            dbal.DBhydrate();
            DaoClient   daoClient   = new DaoClient(dbal);
            DaoSalle    daoSalle    = new DaoSalle(dbal);
            DaoHoraire  daoHoraire  = new DaoHoraire(dbal);
            DaoJoueur   daoJoueur   = new DaoJoueur(dbal);
            DaoPartie   daoPartie   = new DaoPartie(dbal);
            DaoObstacle daoObstacle = new DaoObstacle(dbal);
            DaoAvis     daoAvis     = new DaoAvis(dbal);

            var randNb        = new Random();
            var randFirstName = RandomizerFactory.GetRandomizer(new FieldOptionsFirstName());
            var randLastName  = RandomizerFactory.GetRandomizer(new FieldOptionsLastName());
            var randNaissance = RandomizerFactory.GetRandomizer(new FieldOptionsDateTime
            {
                From = new DateTime(1970, 1, 1), To = DateTime.Today.AddYears(-18), IncludeTime = false
            });
            var randComm = RandomizerFactory.GetRandomizer(new FieldOptionsTextLipsum());

            for (int i = 0; i < 100; i++)
            {
                string nom = randFirstName.Generate();
                daoClient.NouveauClient(new Client(randLastName.Generate(), nom, randNaissance.Generate().Value,
                                                   nom + "@gmail.com", "0600000000", "une adresse", 100));
            }

            for (DateTime j = debut; j < fin; j = j.AddDays(1))
            {
                foreach (Salle salle in daoSalle.GetAll())
                {
                    foreach (Horaire horaire in daoHoraire.GetHorairesForSite(salle.Site))
                    {
                        if (randNb.Next(4) != 0) // 75 %
                        {
                            Partie partie   = new Partie(salle, horaire, j);
                            int    nbJoueur = randNb.Next(2, 8);
                            for (int i = 0; i < nbJoueur; i++)
                            {
                                string name   = randFirstName.Generate();
                                Joueur joueur = new Joueur(name, name + "@gmail.com");
                                daoJoueur.AddJoueur(ref joueur);
                                partie.LstJoueur.Add(joueur);

                                if (randNb.Next(2) != 0) // 50 %
                                {
                                    daoAvis.Add(joueur, j, randComm.Generate());
                                }
                            }
                            // int nbObstacle = randNb.Next(6, 13);
                            // for (int i = 0; i < nbObstacle; i++)
                            // {
                            //
                            // }
                            partie.LstObstacle = daoObstacle.GetAllObstacle(); // temporaire (rajouter des obstacle dans la bdd
                            daoPartie.NouvellePartie(partie);
                        }
                    }
                }
            }
        }
コード例 #26
0
 public Home(Dbal dbal)
 {
     _dbal = dbal;
     InitializeComponent();
     StatWrapPanel.DataContext = new viewModel.ViewModelStat(new DaoPartie(dbal), new DaoSite(dbal));
 }
コード例 #27
0
ファイル: Login.xaml.cs プロジェクト: SIO2-PPE/EGCManager
 public Login(Dbal thedbal)
 {
     InitializeComponent();
     _dbal = thedbal;
 }
コード例 #28
0
 public CreationClient(Dbal dbal)
 {
     _dbal      = dbal;
     _daoClient = new DaoClient(dbal);
     InitializeComponent();
 }
コード例 #29
0
 public SaisieClient(Dbal dbal)
 {
     _dbal      = dbal;
     _daoClient = new DaoClient(dbal);
     InitializeComponent();
 }