Пример #1
0
 public void Install()
 {
     if (InstallPackages.Count > 0)
     {
         InstallPackage installPackage = InstallPackages.Dequeue();
         installPackage.SetEventOnFinished((_installPackage) =>
         {
             InstallPackage iinstallPackage = _installPackage as InstallPackage;
             if (iinstallPackage.IsSucess)
             {
                 if (InstallPackages.Count > 0)
                 {
                     Install();
                 }
                 else
                 {
                     IsSucess = true;
                     App.MainThread.Post(OnFinished, this);
                 }
             }
             else
             {
                 IsSucess = false;
                 InstallPackages.Clear();
                 App.MainThread.Post(OnFinished, this);
             }
         });
     }
 }
Пример #2
0
 public Installer(string[] packagePathes)
 {
     InstallPackages = new Queue <InstallPackage>();
     for (int i = 0; i < packagePathes.Length; i++)
     {
         string         pathes         = packagePathes[i];
         InstallPackage installPackage = new InstallPackage(pathes);
         InstallPackages.Enqueue(installPackage);
     }
 }