// 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; } } }
public static void RetirerTaches(System.Collections.IList lstTch, ListeTaches lstTchCible) { List <Tache> tmpLstTch = new List <Tache>(); foreach (Tache item in lstTch) { tmpLstTch.Add(item); } foreach (Tache item in tmpLstTch) { lstTchCible.RetirerTache(item); } }
public static void AjouterTache(Tache tch, ListeTaches lstTchCible) { lstTchCible.AjouterTache(tch); }
public ActualiseurListeTaches(ListeTaches lstTch) : base() { this.ListeDeTaches = lstTch; }