예제 #1
0
 public void AjouterTraitement(TraitementPhytosanitaire t)
 {
     t.Parcelle = this;
     gestion.Ajouter(t);
 }
예제 #2
0
        private void ShowListViewPulverisations(TraitementPhytosanitaire tp)
        {
            currentType = TypePulverisation;

            toolStripLabel.Text = "Chargements des pulvérisations";
            // Affichage des traitements dans le listView

            if (tp is TraitementEnChamp)
            {
                TraitementEnChamp tec = (tp as TraitementEnChamp);

                listView.Columns.Add("Description", 100);
                listView.Columns.Add("Date", 100);
                toolStripProgressBar.Maximum = tec.Pulverisations.Count;

                foreach (Pulverisation pu in tec.Pulverisations)
                {
                    ListViewItem lvi = new ListViewItem(new string[] { pu.Description, pu.DatePulverisation.ToShortDateString() }, TypePulverisation);
                    lvi.Tag = pu;
                    lvi.ImageIndex = TypePulverisation;
                    listView.Items.Add(lvi);

                    toolStripProgressBar.Value++;
                }
            }
            else
            {
                listView.Columns.Add("Informations", 400);
                listView.Items.Add("Ce traitement ne gère pas les pulvérisations");
            }
        }