Beispiel #1
0
 void ActivationCompleted(object sender, ActivationCompletedEventArgs e)
 {
     //安装完成
     isComplete = true;
     lab_filename.Text = "安装完成";
     lab_percent.Text = "100%";
     if (pgbApp.Value != pgbApp.Maximum)
     {
         pgbApp.Value = pgbApp.Maximum;
     }
     if (e.Error != null)
     {
         lab_filename.Text += ",但出现错误";
         lab_filename.Update();
     }
     else
     {
         lab_filename.Update();
         System.Threading.Thread.Sleep(1000);
         string filename = GetFileName(e.Manifest.Application.Location, e.Manifest.Application.EntryPoint.File);
         Startup(filename, e.Manifest.Application.EntryPoint.Parameters);
         if (args != null && args.Length > 0)
         {
             Exit();
         }
     }
 }
Beispiel #2
0
 private void OnActivationCompleted(ActivationCompletedEventArgs e)
 {
     if (ActivationCompleted != null)
     {
         ActivationCompleted(this, e);
     }
 }
Beispiel #3
0
 private void fileCopyer_FileCopyCompleted(object sender, FileCopyCompletedEventArgs e)
 {
     Clear();
     try
     {
         updateCfgView.Version = e.Manifest.Version;
     }
     catch
     {
     }
     if (ActivationCompleted != null)
     {
         ActivationCompletedEventArgs evt = new ActivationCompletedEventArgs(e.Error, e.Cancelled, e.UserState);
         evt.Manifest = e.Manifest;
         OnActivationCompleted(evt);
     }
 }