Exemplo n.º 1
0
 public void addActivatedKey(ActivatedKey key)
 {
     if (key != null)
     {
         this.activatedKeysName.Add(key);
         if (onActivatedKeyAdded != null)
             onActivatedKeyAdded(key);
     }
 }
Exemplo n.º 2
0
 private void onActivatedKeysAddedUpdate(ActivatedKey key)
 {
     activatedGridView.Rows.Add(key.Key, key.Date, key.Ip);
 }
Exemplo n.º 3
0
 public void removeActivatedKey(ActivatedKey key)
 {
     if (key != null)
     {
         this.activatedKeysName.Remove(key);
         if (onActivatedKeyRemoved != null)
             onActivatedKeyRemoved(key);
     }
 }
Exemplo n.º 4
0
 public List<ActivatedKey> loadActivated()
 {
     try
     {
         keysActivatedDocument.Load(activatedFileName);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     XmlElement xRoot = keysActivatedDocument.DocumentElement;
     List<ActivatedKey> keys = new List<ActivatedKey>();
     foreach (XmlNode xnode in xRoot)
     {
         ActivatedKey key = new ActivatedKey();
         foreach (XmlNode childnode in xnode.ChildNodes)
         {
             if (childnode.Name == "name")
             {
                 key.Key = childnode.InnerText;
             }
             if (childnode.Name == "date")
             {
                 key.Date = childnode.InnerText;
             }
             if (childnode.Name == "ip")
             {
                 key.Ip = childnode.InnerText;
             }
         }
         keys.Add(key);
     }
     return keys;
 }