예제 #1
0
 public static void initServers()
 {
     servers=new Dictionary<string,PIServerInfo>();
     XDocument doc = XDocument.Load(String.Format("{0}/Data/servers.xml",defPath));
     foreach (XElement server in doc.Root.Elements("server")) {
         string id=server.Attribute("id").Value;
         string serverName = server.Attribute("serverName").Value;
         PIServerInfo newServer = new PIServerInfo(id, serverName);
         servers.Add(id, newServer);
     }
 }
예제 #2
0
 public static void addServer(string id, string name)
 {
     PIServerInfo newServer = new PIServerInfo(id, name);
     servers.Add(id, newServer);
 }