Ejemplo n.º 1
0
 public ProcessBackground(int Max, DoWorkEventHandler DoWork, ProgressChangedEventHandler worker_ProgressChanged)//最大值和标题
 {
     progressForm = new FrmAutoUpdate();
     progressForm.progressBarDownload.Value = 0;
     progressForm.Show();
     SetbackgroundWorker(DoWork, worker_ProgressChanged);
 }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 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);
             
     }
 }
Ejemplo n.º 4
0
 public ProcessBackground(int Max, DoWorkEventHandler DoWork, ProgressChangedEventHandler worker_ProgressChanged)//最大值和标题
 {
     progressForm = new FrmAutoUpdate();
     progressForm.progressBarDownload.Value = 0;
     progressForm.Show();
     SetbackgroundWorker(DoWork, worker_ProgressChanged);
 }