//--------------------------------------------------------------------- private void CheckUpdate() { string lastUpdate = MyApp.GetNodeValue("/AppData/LastUpdate"); MyWebPage myWebPage = new MyWebPage(MyApp.HostIP); if (myWebPage.PingHost()) { string szURL = MyApp.WebSite + "/api/CheckUpdate.php"; string param = "no=" + m_nMachineNo.ToString() + "&t1=" + lastUpdate; string buf = myWebPage.GetResponseString(szURL, param); if (buf != "") { string[] aAry = buf.Split(','); for (Int32 i = 0; i < aAry.Length; i += 2) { DownFile(aAry[i], aAry[i + 1]); // 下載檔案並更新。 } listBox1.Items.Add("Update OK!"); lastUpdate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); MyApp.SetNodeValue("/AppData/LastUpdate", lastUpdate); MyApp.Save(); } else { listBox1.Items.Add("No Updated"); } } }