public FormToutEmbalV3() { InitializeComponent(); productions = new List <Production>(); productions.Add(new Production("A", 10000, 1000)); productions.Add(new Production("B", 25000, 5000)); productions.Add(new Production("C", 120000, 10000)); productions.Add(new Production("D", 85000, 10000)); productions.Add(new Production("E", 700, 2000)); productions.Add(new Production("F", 800, 3000)); productions.Add(new Production("G", 500, 4000)); productions.Add(new Production("H", 200, 7000)); productions.Add(new Production("I", 300, 3000)); foreach (Production prod in productions) { this.AjouterProd(prod); } timerHeure.Start(); toolStripStatusLabelHeure.Text = DateTime.Now.ToString("t"); miseAjourIHM = new DelegateMiseAJourIHM(MiseAjourIHM); for (int i = 0; i < productions.Count; i++) { this.MiseAjourIHM(productions[i], productions[i].StatutDeLaProduction); } }
public FormToutEmbalV2(Production prod1, Production prod2, Production prod3) { InitializeComponent(); timerHeure.Start(); toolStripStatusLabelHeure.Text = DateTime.Now.ToString("t"); this.prodTypeA = prod1; this.prodTypeB = prod2; this.prodTypeC = prod3; productions = new List <Production>(); productions.Add(prodTypeA); productions.Add(prodTypeB); productions.Add(prodTypeC); //event & thread prodTypeA.ChangementStatutProduction += ProdTypeA_ChangementStatutProduction; prodTypeB.ChangementStatutProduction += ProdTypeB_ChangementStatutProduction; prodTypeC.ChangementStatutProduction += ProdTypeC_ChangementStatutProduction; prodTypeA.ChangementNbCaisses += ProdTypeA_ChangementNbCaisses; prodTypeB.ChangementNbCaisses += ProdTypeB_ChangementNbCaisses; prodTypeC.ChangementNbCaisses += ProdTypeC_ChangementNbCaisses; miseAjourIHM = new DelegateMiseAJourIHM(MiseAjourIHM); this.MiseAjourIHM(); }
public Production() { InitializeComponent(); CaissesA = new ProductionDeCaisses(10000, 1000); CaissesB = new ProductionDeCaisses(25000, 5000); CaissesC = new ProductionDeCaisses(120000, 10000); CaissesA.ChangementNbCaisses += CaissesA_ChangementNbCaisses; CaissesB.ChangementNbCaisses += CaissesB_ChangementNbCaisses; CaissesC.ChangementNbCaisses += CaissesC_ChangementNbCaisses; majIHM = new DelegateMiseAJourIHM(MajIHM); progressBarProdA.Maximum = 10000; progressBarProdB.Maximum = 25000; progressBarProdC.Maximum = 120000; }