Exemple #1
0
        public void AddClient(ClientInfo info)
        {
            if (info.Hash == null) throw new ArgumentNullException("info.Hash");
            if (info.Key1 == null) throw new ArgumentNullException("info.Key1");
            if (info.Key2 == null) throw new ArgumentNullException("info.Key2");

            SetAttribute(info.Key1, "Key1", new ElementInfo("Client", new AttributeInfo("Hash", info.Hash)));
            SetAttribute(info.Key2, "Key2", new ElementInfo("Client", new AttributeInfo("Hash", info.Hash)));
        }
Exemple #2
0
        public ClientInfo[] EnumClients()
        {
            ElementInfo[] eiList = EnumarateElements("Client");
            ClientInfo[] clientList = new ClientInfo[eiList.Length];

            for (int i = 0; i < eiList.Length; i++)
            {
                clientList[i].Hash = eiList[i].Attributes["Hash"].ToString();
                clientList[i].Key1 = eiList[i].Attributes["Key1"].ToString();
                clientList[i].Key2 = eiList[i].Attributes["Key2"].ToString();
            }

            return clientList;
        }
Exemple #3
0
 public ClientInfo FindClient(string Hash)
 {
     ClientInfo info = new ClientInfo();
     if (ElementExists(new ElementInfo("Client", new AttributeInfo("Hash", Hash))))
     {
         info.Hash = Hash;
         info.Key1 = GetAttribute("", "Key1", new ElementInfo("Client", new AttributeInfo("Hash", Hash)));
         info.Key2 = GetAttribute("", "Key2", new ElementInfo("Client", new AttributeInfo("Hash", Hash)));
         return info;
     }
     else
     {
         return new ClientInfo();
     }
 }
Exemple #4
0
        public bool Load()
        {
            ClientList list = new ClientList();
            list.Path = System.IO.Path.Combine(Core.LaunchData.PhoenixDir, ClientList.Filename);
            list.Load();
            ClientInfo = list.FindClient(Core.LaunchData.ClientHash);

            if (Calculated)
            {
                Trace.WriteLine("Clients keys found.", "Phoenix");
                return true;
            }
            else
            {
                Trace.WriteLine("Clients keys not found.", "Phoenix");
                return false;
            }
        }