Esempio n. 1
0
 public virtual bool HasChildrens()
 {
     if (IsDirty)
     {
         RebuildChildrens();
         IsDirty = false;
     }
     return(Childrens.Any());
 }
Esempio n. 2
0
 protected void ClearChildrens()
 {
     if (!Childrens.Any())
     {
         return;
     }
     if (!HasDummyChild)
     {
         UiServices.SetBusyState();
         foreach (var c in Childrens.ToList())
         {
             c.Dispose();
         }
         if (Event.SubEventsCount > 0)
         {
             Childrens.Add(DummyChild);
         }
     }
 }
Esempio n. 3
0
    public override string ToString()
    {
        var result = "{\r\n \"Max\": " + (Max == null ? "null" : Max.ToString().ToLower()) + ",\r\n"
                     + "\"Eval\": " + Eval + ",\r\n"
                     + "\"Choix\": \"" + Choix + "\",\r\n"
                     + "\"Profondeur\": " + Profondeur + ",\r\n"
                     + "\"Childrens\" : [";

        if (Childrens != null && Childrens.Any())
        {
            result += "\r\n";
            foreach (var item in Childrens)
            {
                if (item != Childrens.First())
                {
                    result += ",";
                }
                result += item.ToString();
            }
        }
        result += "] \r\n}\r\n";
        return(result);
    }