public static List <ImageApp> GetAppList(int type = 1, string ids = "") { string ext = type == 1 ? ".apk" : ".ipa"; XmlDocument xmlDom = new XmlDocument(); string xmlString = EnvInfo.HttpGet(api + "app/platform/" + type + "/ids/" + ids.Replace(',', '-')); xmlDom.LoadXml(xmlString); XmlNode node = xmlDom.ChildNodes[1].ChildNodes[2]; List <ImageApp> tempList = new List <ImageApp>(); for (int i = 0; i < node.ChildNodes.Count; i++) { string appId = node.ChildNodes[i].SelectSingleNode("cid").InnerText; string appName = node.ChildNodes[i].SelectSingleNode("title").InnerText; string appPath = appDir + appId + ext; string appUrlPath = uploads + node.ChildNodes[i].SelectSingleNode("down_link").InnerText; string appImgPath = appDir + appId + ".jpg"; string appImgUrlPath = uploads + node.ChildNodes[i].SelectSingleNode("thumb").InnerText; ImageApp app = new ImageApp(appId, appName, appPath, appUrlPath, appImgPath, appImgUrlPath); app.Location = new Point(10 + i * 80, 10); tempList.Add(app); } return(tempList); }
public void Add(ImageApp app) { this.Controls.Add(app); this.appList.Add(app); }