Exemplo n.º 1
0
 public KLTag getTagByID(string ID)
 {
     KLTag tag = new KLTag();
     foreach(KLTag t in this.tags)
     {
         if (t.getID().Equals(ID,StringComparison.InvariantCultureIgnoreCase))
         {
             tag = t;
             break;
         }
     }
     return tag;
 }
Exemplo n.º 2
0
 private void readTagsBase()
 {
     XDocument doc = XDocument.Load(path);
     foreach (XElement tagEl in doc.Root.Elements())
     {
         KLTag tag = new KLTag();
         foreach(XElement el in tagEl.Elements())
         {
             if (el.Name == "id") tag.setID(el.Value); else
             if (el.Name == "name_ua") tag.setNameUA(el.Value); else 
             if (el.Name == "name_ru") tag.setNameRU(el.Value); else
             if (el.Name == "color") tag.setColor(el.Value);
         }
         tags.Add(tag);
     }
 }
Exemplo n.º 3
0
 public void addTag(KLTag tag)
 {
     this.tags.Add(tag);
 }