Ejemplo n.º 1
0
        private string cheminFichier = "donnees.xml"; // Nom du fichier de la maintenance (ex : ile de france)

        private void Form1_Load(object sender, EventArgs e)
        {
            DateTime         unedate  = new DateTime(2012, 06, 1);
            List <TypeBorne> desTypes = new List <TypeBorne>();;

            TypeBorne Type1 = new TypeBorne("NORM", 30, 30, 80);
            TypeBorne Type2 = new TypeBorne("SEMI", 45, 20, 100);
            TypeBorne Type3 = new TypeBorne("RAPI", 50, 15, 120);

            desTypes.Add(Type1);
            desTypes.Add(Type2);
            desTypes.Add(Type3);

            /*List<Borne> S1Bornes = new List<Borne>();
             * List<Borne> S2Bornes = new List<Borne>();
             * Borne S1B1 = new Borne(1, 20, Type2);
             * Borne S1B2 = new Borne(2, 110, unedate, Type3);
             * Borne S2B1 = new Borne(1, 85, Type1);
             * Borne S2B2 = new Borne(2, 110, unedate, Type2);
             * Borne S2B3 = new Borne(3, 20, Type2);
             * S1Bornes.Add(S1B1);
             * S1Bornes.Add(S1B2);
             * S2Bornes.Add(S2B1);
             * S2Bornes.Add(S2B2);*/

            List <Station> desStations = new List <Station>();
            Station        S1          = new Station(1, "Gentilly");
            Station        S2          = new Station(2, "Cachan");
            Station        S3          = new Station(3, "Choisy");

            desStations.Add(S1);
            desStations.Add(S2);
            desStations.Add(S3);



            List <Technicien> desTechniciens = new List <Technicien>();
            Technicien        T1             = new Technicien(1, "Legenty", "Geoffrey");
            Technicien        T2             = new Technicien(2, "Amari", "Sofiane");
            Technicien        T3             = new Technicien(3, "Magassa", "Nouhou");

            desTechniciens.Add(T1);
            desTechniciens.Add(T2);
            desTechniciens.Add(T3);

            CRAB = new Maintenance(desStations, desTechniciens, desTypes);
            CRAB.GenereVisitesP();
            CRAB.lierVisites(lbx_visites, CRAB.LesVisites);
        }
Ejemplo n.º 2
0
 private void btn_simuler_Click(object sender, EventArgs e)
 {
     maintenance1.simuBornesStations(Convert.ToDecimal(txbn_bornes.Value));
     maintenance1.GenereVisitesP();
     this.Close();
 }
Ejemplo n.º 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            DateTime unedate = new DateTime(2012, 06, 1);
            List<TypeBorne> desTypes = new List<TypeBorne>(); ;

            TypeBorne Type1 = new TypeBorne("NORM", 30, 30, 80);
            TypeBorne Type2 = new TypeBorne("SEMI", 45, 20, 100);
            TypeBorne Type3 = new TypeBorne("RAPI", 50, 15, 120);
            desTypes.Add(Type1);
            desTypes.Add(Type2);
            desTypes.Add(Type3);

            /*List<Borne> S1Bornes = new List<Borne>();
            List<Borne> S2Bornes = new List<Borne>();
            Borne S1B1 = new Borne(1, 20, Type2);
            Borne S1B2 = new Borne(2, 110, unedate, Type3);
            Borne S2B1 = new Borne(1, 85, Type1);
            Borne S2B2 = new Borne(2, 110, unedate, Type2);
            Borne S2B3 = new Borne(3, 20, Type2);
            S1Bornes.Add(S1B1);
            S1Bornes.Add(S1B2);
            S2Bornes.Add(S2B1);
            S2Bornes.Add(S2B2);*/

            List<Station> desStations = new List<Station>();
            Station S1 = new Station(1, "Gentilly");
            Station S2 = new Station(2, "Cachan");
            Station S3 = new Station(3, "Choisy");
            desStations.Add(S1);
            desStations.Add(S2);
            desStations.Add(S3);

            List<Technicien> desTechniciens = new List<Technicien>();
            Technicien T1 = new Technicien(1, "Legenty", "Geoffrey");
            Technicien T2 = new Technicien(2, "Amari", "Sofiane");
            Technicien T3 = new Technicien(3, "Magassa", "Nouhou");
            desTechniciens.Add(T1);
            desTechniciens.Add(T2);
            desTechniciens.Add(T3);

            CRAB = new Maintenance(desStations, desTechniciens,desTypes);
            CRAB.GenereVisitesP();
            CRAB.lierVisites(lbx_visites,CRAB.LesVisites);
        }