public GetUpdateInfo(string Url, string Method, string PostData, MyDeleGetInfo Callback) { if (PostData == null) { PostData = string.Empty; //提高效率? } Respond = HttpHelper.SendPostData(Url, "text/html, application/xhtml+xml, */*", "1", "text/html", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)", Method, PostData, new CookieContainer()); MyCallBack = Callback; //存储处理方法 }
public UpdateSever(string Url,string Method,string PostData,MyDeleGetInfo Callback,string OldDt,bool Canuseold) : base(Url,Method,PostData,Callback) { oldDt = OldDt; CanUseOld = Canuseold; version = base.GetUpdateVersionInfo; TimeSpan ts=new TimeSpan (DateTime.Parse(version.LatestDt).Ticks-DateTime.Parse(oldDt).Ticks); if (ts.Ticks > 0) needUpdate = true; else needUpdate = false; }
public UpdateSever(string Url, string Method, string PostData, MyDeleGetInfo Callback, string OldDt, bool Canuseold) : base(Url, Method, PostData, Callback) { oldDt = OldDt; CanUseOld = Canuseold; version = base.GetUpdateVersionInfo; TimeSpan ts = new TimeSpan(DateTime.Parse(version.LatestDt).Ticks - DateTime.Parse(oldDt).Ticks); if (ts.Ticks > 0) { needUpdate = true; } else { needUpdate = false; } }
private string Respond; //存储返回数据 #endregion Fields #region Constructors public GetUpdateInfo(string Url,string Method,string PostData,MyDeleGetInfo Callback) { if (PostData == null) PostData = string.Empty; //提高效率? Respond = HttpHelper.SendPostData(Url, "text/html, application/xhtml+xml, */*", "1", "text/html", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)", Method, PostData, new CookieContainer()); MyCallBack = Callback; //存储处理方法 }