// METHODES =========================
 static void ActualiserListeTaches(ListeTaches lstTch)
 {
     foreach (Tache tch in lstTch.ListeDeTaches)
     {
         tch.ActualiserStatut();
         // Création de nouvelles tâches pour les tâches à périodicité dont la date est passée
         // Todo : pas de création en boucle. Donc un statut pour la tâche qui en a enfanté une autre.
         if (tch.idTacheRepetee == null && tch.ContrainteTps.EstEnRetard() && tch.ContrainteTps.Periodicite != null)
         {
             Tache nwTch = new Tache(
                 tch.Intitule,
                 tch.Duree,
                 Statuts.aFaire,
                 tch.Notes,
                 new ContrainteTemps()
             {
                 DateLimite   = tch.ContrainteTps.AjoutPeriodicite(),
                 DelaiUrgence = tch.ContrainteTps.DelaiUrgence,
                 Periodicite  = tch.ContrainteTps.Periodicite
             }
                 );
             lstTch.AjouterTache(nwTch);
             tch.idTacheRepetee = nwTch.DateCreation;
         }
     }
 }
Example #2
0
 public static void AjouterTache(Tache tch, ListeTaches lstTchCible)
 {
     lstTchCible.AjouterTache(tch);
 }