Пример #1
0
 public void NotificationProductionTerminee(Production prodSender, StatutProduction prodStatut)
 {
     if (prodStatut == StatutProduction.Terminé)
     {
         this.Invoke(this.miseAjourIHM, new Object[] { prodSender, prodStatut });
         MessageBox.Show("Production " + prodSender.Nom + " terminée !");
     }
 }
Пример #2
0
 public void NotificationProductionTerminee(Production prod, StatutProduction prodStatut)
 {
     if (prodStatut == StatutProduction.Terminé)
     {
         this.Invoke(this.miseAjourIHM);
         MessageBox.Show("Production " + prod.Nom + " terminée !");
     }
 }
Пример #3
0
        private void MiseAjourIHM(Production prodSender, StatutProduction prodStatut)
        {
            ProgressBar progressbar = this.Controls.Find("progressBar" + prodSender.Nom, true).First() as ProgressBar;

            progressbar.Value = prodSender.CalculAvancementEnPourcentage();

            TextBox textBoxNbCaisseDepuisDemarrage = this.Controls.Find("textBoxNbCaisseDepuisDemarrage" + prodSender.Nom, true).First() as TextBox;

            textBoxNbCaisseDepuisDemarrage.Text = prodSender.NbCaissesDepuisDemarrageTotal.ToString();

            TextBox textBoxTauxDefautHeure = this.Controls.Find("textBoxTauxDefautHeure" + prodSender.Nom, true).First() as TextBox;

            textBoxTauxDefautHeure.Text = prodSender.CalculTauxDefautHeure().ToString();

            TextBox textBoxTauxDefautDepuisDemarrage = this.Controls.Find("textBoxTauxDefautDepuisDemarrage" + prodSender.Nom, true).First() as TextBox;

            textBoxTauxDefautDepuisDemarrage.Text = prodSender.CalculTauxDefautDepuisDemarrage().ToString();

            TextBox textBoxEtatProduction = this.flowLayoutPanelEtat.Controls.Find("textBoxEtat" + prodSender.Nom, true).First() as TextBox;

            textBoxEtatProduction.Text = prodSender.StatutDeLaProduction.ToString();

            Button boutonDemarrer  = this.Controls.Find("buttonDemarrer" + prodSender.Nom, true).First() as Button;
            Button boutonPause     = this.Controls.Find("buttonPause" + prodSender.Nom, true).First() as Button;
            Button boutonContinuer = this.Controls.Find("buttonContinuer" + prodSender.Nom, true).First() as Button;

            boutonDemarrer.Enabled  = this.DemarragePossible(prodSender);
            boutonPause.Enabled     = this.PausePossible(prodSender);
            boutonContinuer.Enabled = this.ReprisePossible(prodSender);

            ToolStripMenuItem menuDemarrer  = this.démarrerToolStripMenuItem.DropDownItems.Find(prodSender.Nom + "ToolStripMenuItem", true).First() as ToolStripMenuItem;
            ToolStripMenuItem menuPause     = this.suspendreToolStripMenuItem.DropDownItems.Find(prodSender.Nom + "ToolStripMenuItem", true).First() as ToolStripMenuItem;
            ToolStripMenuItem menuContinuer = this.continuerToolStripMenuItem.DropDownItems.Find(prodSender.Nom + "ToolStripMenuItem", true).First() as ToolStripMenuItem;

            menuDemarrer.Enabled  = this.DemarragePossible(prodSender);
            menuPause.Enabled     = this.PausePossible(prodSender);
            menuContinuer.Enabled = this.ReprisePossible(prodSender);
        }
Пример #4
0
 private void Prod_ChangementStatutProduction(Production prodSender, StatutProduction prodStatut)
 {
     this.NotificationProductionTerminee(prodSender, prodStatut);
     this.Invoke(this.miseAjourIHM, new Object[] { prodSender, prodStatut });
 }
Пример #5
0
 private void Prod_ChangementNbCaisses(Production prodSender, StatutProduction prodStatut)
 {
     this.Invoke(this.miseAjourIHM, new Object[] { prodSender, prodStatut });
 }
Пример #6
0
 private void ProdTypeA_ChangementStatutProduction(Production prodSender, StatutProduction prodStatut)
 {
     this.NotificationProductionTerminee(prodSender, prodStatut);
 }
Пример #7
0
 private void ProdTypeC_ChangementNbCaisses(Production prodSender, StatutProduction prodStatut)
 {
     this.Invoke(this.miseAjourIHM);
 }
Пример #8
0
 private static void Prod1_ChangementNbCaisses(Production prodSender, StatutProduction prodStatut)
 {
     Console.WriteLine(prodSender.NbCaissesDepuisDemarrageTotal.ToString());
 }
Пример #9
0
 private static void Prod1_ChangementStatutProduction(Production prodSender, StatutProduction prodStatut)
 {
     Console.WriteLine(prodSender.StatutDeLaProduction.ToString());
 }