Exemple #1
0
 public void Activate(Manifest[] manifests)
 {
     foreach (var m in manifests)
     {
         OnActivationInitializing(new ManifestEventArgs() { Manifest = m });
         Backup(m);
         ActivationStartedEventArgs e = new ActivationStartedEventArgs() { Manifest = m };
         OnActivationStarted(e);
         if (e.Cancel)
         {
             Clear();
             break;
         }
         else
         {
             fileCopyer.CopyAsync(m, downloader.TempPath);
         }
     }
 }
Exemple #2
0
 private void OnActivationStarted(ActivationStartedEventArgs e)
 {
     if (ActivationStarted != null)
     {
         ActivationStarted(this, e);
     }
 }
 void ActivationStarted(object sender, ActivationStartedEventArgs e)
 {
     lab_filename.Text = "开始安装,请稍后......";
     lab_filename.Update();
     e.Cancel = CheckActivation();
     if (e.Cancel)
     {
         lab_filename.Text = "安装已被取消";
         isComplete = true;
     }
 }