Exemple #1
0
 public void OnMouseMove(CControleMapBesoinOld controleMap, Point ptLocal)
 {
     if (m_rectangleZoneExpand != null && m_rectangleZoneExpand.Value.Contains(ptLocal))
     {
         if (m_satisfaction.Equals(controleMap.m_satisfactionRacine))
         {
             controleMap.Cursor = Cursors.No;
         }
         else
         {
             controleMap.Cursor = Cursors.Hand;
         }
     }
     else
     {
         controleMap.Cursor = Cursors.Default;
     }
 }
Exemple #2
0
 //------------------------------------------------------------------------------------------------------------------------------
 private static bool IsRecursiveSatisfactionFor(ISatisfactionBesoin sat, CBesoin besoin, HashSet <ISatisfactionBesoin> satFaites)
 {
     if (sat.Equals(besoin))
     {
         return(true);
     }
     if (satFaites.Contains(sat))
     {
         return(false);
     }
     satFaites.Add(sat);
     foreach (CBesoin b in sat.BesoinsSolutionnes)
     {
         if (b != null && b.Equals(besoin))
         {
             return(true);
         }
         if (IsRecursiveSatisfactionFor(b, besoin, satFaites))
         {
             return(true);
         }
     }
     return(false);
 }