Installer mods.

This commit is contained in:
McMak 2015-04-27 20:21:09 +03:00
parent c22d6b60f3
commit 47adf43407
23 changed files with 1381 additions and 567 deletions

View file

@ -46,9 +46,9 @@ namespace WebsitePanel.Setup.Common
int totalFiles = 0;
int files = 0;
public ZipIndicator(ProgressBar progressBar, string sourcePath, string zipFile)
public ZipIndicator(object progressBar, string sourcePath, string zipFile)
{
this.progressBar = progressBar;
this.progressBar = progressBar as ProgressBar;
this.sourcePath = sourcePath;
this.zipFile = zipFile;
}
@ -71,8 +71,11 @@ namespace WebsitePanel.Setup.Common
{
string fileName = e.CurrentEntry.FileName;
files++;
this.progressBar.Value = Convert.ToInt32(files * 100 / totalFiles);
this.progressBar.Update();
if (this.progressBar != null)
{
this.progressBar.Value = Convert.ToInt32(files * 100 / totalFiles);
this.progressBar.Update();
}
}
}
}