private void WorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Cancelled) { OnOperationStatusChanged(new ProcessStatusEventArgs($"Cancelled installation of package {Name}", ComponentType)); } else { Log.Debug($"Installation finished of package: {Name}"); InstallationFinished?.Invoke(this, new OperationFinishedEventArgs(e.Error, e.Cancelled, this, OperationType.Install)); } _worker.DoWork -= ExecuteProcess; _worker.RunWorkerCompleted -= WorkerCompleted; }
public UploadInstaller(RepositoryFileInfoBase InstallItem, Functions.UpdateProgressInfo OnUploadProgress, InstallationFinished OnInstallationFinished) { this.InstallItem = InstallItem; this.OnInstallationFinished = OnInstallationFinished; this.OnProgressChanged = OnUploadProgress; LocalFolder = Constants.TemporaryFolder; ExecuteScriptSequence = new List <string>(); DeleteFoldersBeforeInstall = new List <string>(); UploadLocation = "/"; DeleteFilesBeforeInstall = new List <string>(); CleanupAfterInstall = true; InstallationFinished = false; InstallResult = string.Empty; FillMetaInfo(); }