private void add(AutoVarData avd, string type, System.Xml.XmlElement x) { if (type == "projectfolder") { add(x.GetAttributeString("target"), avd.ProjectFolder); } else if (type == "installfolder") { add(x.GetAttributeString("target"), avd.InstallFolder); } else if (type == "enviroment") { add(x.GetAttributeString("target"), Environment.GetEnvironmentVariable(x.GetFirstText())); } else if (type == "version") { addVersion(avd, x.GetAttributeString("for"), x.GetAttributeString("version").ToLower()); } else if (type == "external") { add(avd.externals.get(x.GetAttributeString("ui"), x.GetAttributeString("target"), x.GetAttributeString("description"))); } else { throw new Exception("unknwon autovar " + type); } }