Пример #1
0
        private void BGWorkerUpdate_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            BGWorkerUpdate.ReportProgress(10, "正在升级...");
            work.Bak();

            Thread.Sleep(500);
            BGWorkerUpdate.ReportProgress(50, "正在下载更新文件...");
            work.DownLoad();

            Thread.Sleep(500);
            BGWorkerUpdate.ReportProgress(80, "正在配置更新...");
            work.Update();

            Thread.Sleep(500);
            BGWorkerUpdate.ReportProgress(100);
        }
Пример #2
0
 private void UpdateForm_Shown(object sender, EventArgs e)
 {
     BGWorkerUpdate.RunWorkerAsync();
 }