/// <summary>
 /// Load data from an xml node
 /// </summary>
 /// <param name="dict"></param>
 public void Load(XmlNode dict)
 {
     foreach (XmlNode child in dict)
     {
         Legende leg = new Legende();
         leg.Load(child);
         this.legendes.Add(leg);
     }
 }
 /// <summary>
 /// Update from the web browser
 /// </summary>
 /// <param name="elem">html element</param>
 public void Update(System.Windows.Forms.HtmlElement elem)
 {
     // un update des legendes => on efface les anciennes legendes
     this.Clear();
     foreach (System.Windows.Forms.HtmlElement child in elem.Children)
     {
         Legende leg = new Legende();
         leg.Update(child);
         this.legendes.Add(leg);
     }
 }
 /// <summary>
 /// Add a new element
 /// </summary>
 /// <param name="context">the context</param>
 /// <param name="name">name to create</param>
 /// <param name="desc">description</param>
 /// <param name="type">type of data</param>
 /// <param name="expr">expression</param>
 public void Add(string context, string name, string desc, string type, string expr)
 {
     if (!String.IsNullOrEmpty(name) && context != null)
     {
         ILegende foundLegende = this.legendes.Find(new Predicate <ILegende>(delegate(ILegende a) { return(a.Context == context && a.Name == name); }));
         if (foundLegende != null)
         {
             foundLegende.Description = desc;
             foundLegende.Type        = type;
             foundLegende.Expression  = expr;
         }
         else
         {
             ILegende legende = new Legende();
             legende.Context     = context;
             legende.Name        = name;
             legende.Description = desc;
             legende.Type        = type;
             legende.Expression  = expr;
             this.legendes.Add(legende);
         }
     }
 }