声明:核心功能的实现是由园子里圣殿骑士大哥写的,本人是基于他核心代码,按照自己需求进行修改的. 而AutoUpdaterService.xml文件生成工具是基于评论#215楼 ptangbao的代码而改写的. 由于这个组件是在10年写的,.net也有更新有的方法已提示过时,更改如下: //Added the function to support proxy //clientDownload.Proxy = System.Net.WebProxy.GetDefaultProxy(); cli
接昨天的文章Winform(C#.NET)自动更新组件的使用及部分功能实现 强制更新的实现部分: 将DownloadConfirm窗体修改成单纯的类 public class DownloadConfirm { #region The private fields List<DownloadFileInfo> downloadFileList = null; #endregion #region The constructor of DownloadConfirm public Downloa
在做界面程序时,常常需要一些数据类,界面元素通过绑定等方式显示出数据,然而由于UI线程不是线程安全的,一般都需要通过Invoke等方式来调用界面控件.但对于数据绑定bindingList而言,没法响应listchang事件,导致后端的grid等控件不能更新数据.废了好大的劲终于找到一个UIBindingList,实现线程数据的同步! using System; using System.ComponentModel; using System.Threading; using System.Wi
用IIS或者是Tomcat搭建一个Web服务器,因为没有涉及到动态页面,所以用什么服务器无所谓,网上有太多资料,这里不再赘述. 废话不多说,直接上代码. HttpHelper, 访问网页,下载文件等 using System; using System.Collections.Generic; using System.Text; using System.Net; using System.IO; namespace AutoUpdate { class HttpHelper { //以GET