Exemple #1
0
        private void InstallPiry()
        {
            PirySetup.InstallComplete += OnPiryInstallComplete;
            PirySetup.OnPiryOutput    += HandlePiryOutput;

            Write(Properties.Resources.PiryInstall_DownloadingBO2);
            var successStart = PirySetup.Install(BO2Directory);

            if (!successStart)
            {
                PirySetup.InstallComplete -= OnPiryInstallComplete;
                Error();
            }
        }
Exemple #2
0
        private void DownloadPiry()
        {
            recordedPercentages = new HashSet <int>();

            Write($"Downloading file from '{PirySetup.PiryUrl}' to '{BO2Directory}'...");
            PirySetup.DownloadProgressChangedEvent += OnDownloadProgressChanged;
            PirySetup.DownloadCompleteEvent        += OnPiryDownloadComplete;

            bool downloadSuceeded = PirySetup.Download(BO2Directory);

            if (!downloadSuceeded)
            {
                PirySetup.DownloadCompleteEvent        -= OnPiryDownloadComplete;
                PirySetup.DownloadProgressChangedEvent -= OnDownloadProgressChanged;
                Error();
            }
        }