public ProcessBackground(int Max, DoWorkEventHandler DoWork, ProgressChangedEventHandler worker_ProgressChanged)//最大值和标题 { progressForm = new FrmAutoUpdate(); progressForm.progressBarDownload.Value = 0; progressForm.Show(); SetbackgroundWorker(DoWork, worker_ProgressChanged); }
static void Main(string[] args) { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FrmAutoUpdate frmUpdate = new FrmAutoUpdate(); if (args != null && args.Length == 1) { frmUpdate.UpdateXml = System.Web.HttpUtility.UrlDecode(args[0].ToString()); //LogHelper.Write("AutoUpdate.Main", args[0], LogSeverity.Info); } else { MessageBox.Show("启动失败!请通过开心助手中的检查更新功能进行升级!", MESSAGE_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); return; } Application.Run(frmUpdate); } catch (Exception ex) { //if (args == null) // LogHelper.Write("AutoUpdate.Main", "args is null", ex, LogSeverity.Error); //else // LogHelper.Write("AutoUpdate.Main", args.Length.ToString(), ex, LogSeverity.Error); } }
static void Main(string[] args) { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FrmAutoUpdate frmUpdate = new FrmAutoUpdate(); if (args != null && args.Length == 1) { frmUpdate.UpdateXml = System.Web.HttpUtility.UrlDecode(args[0].ToString()); //LogHelper.Write("AutoUpdate.Main", args[0], LogSeverity.Info); } else { MessageBox.Show("启动失败!请通过书香网阅读器中的检查更新功能进行升级!", MESSAGE_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); return; } Application.Run(frmUpdate); } catch (Exception ex) { //if (args == null) // LogHelper.Write("AutoUpdate.Main", "args is null", ex, LogSeverity.Error); //else // LogHelper.Write("AutoUpdate.Main", args.Length.ToString(), ex, LogSeverity.Error); } }
public ProcessBackground(int Max, DoWorkEventHandler DoWork, ProgressChangedEventHandler worker_ProgressChanged)//最大值和标题 { progressForm = new FrmAutoUpdate(); progressForm.progressBarDownload.Value = 0; progressForm.Show(); SetbackgroundWorker(DoWork, worker_ProgressChanged); }