static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); Application.ThreadExit += new EventHandler(Application_ThreadExit); var updater = FSLib.App.SimpleUpdater.Updater.Instance; //当检查发生错误时,这个事件会触发 updater.Error += new EventHandler(updater_Error); //没有找到更新的事件 updater.NoUpdatesFound += new EventHandler(updater_NoUpdatesFound); //找到更新的事件.但在此实例中,找到更新会自动进行处理,所以这里并不需要操作 //updater.UpdatesFound += new EventHandler(updater_UpdatesFound); //开始检查更新-这是最简单的模式.请现在 assemblyInfo.cs 中配置更新地址,参见对应的文件. FSLib.App.SimpleUpdater.Updater.CheckUpdateSimple(System.Configuration.ConfigurationSettings.AppSettings["UpdaterUrl"]); AppGlobal.AppMain(); }