fix update progress x update applicazione
This commit is contained in:
@@ -13,7 +13,7 @@ namespace NKC_WF.site
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if(!Page.IsPostBack)
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
((SiteContent)this.Master).showSearch = false;
|
||||
}
|
||||
@@ -36,7 +36,6 @@ namespace NKC_WF.site
|
||||
// USER: SWDownloader
|
||||
// PWD: viaD@nte16
|
||||
|
||||
|
||||
LinkButton lnk = (LinkButton)sender;
|
||||
string caller = lnk.CommandArgument;
|
||||
string resultsMsg = "";
|
||||
@@ -48,11 +47,11 @@ namespace NKC_WF.site
|
||||
// ora verifico COSA devo scaricare...
|
||||
if (!string.IsNullOrEmpty(updateUrl(caller)))
|
||||
{
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// se è ALL scarico tutti...
|
||||
if (caller == "ALL")
|
||||
{
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
int done = 0;
|
||||
// scarico TUTTI...
|
||||
done += UpdateMan.obj.downloadLatest(updateUrl("NKC"), localDownloadPath("NKC"), "NKC");
|
||||
@@ -60,13 +59,15 @@ namespace NKC_WF.site
|
||||
stopWatch.Stop();
|
||||
// calcolo elapsed time come TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
resultsMsg = string.Format("OK: {0} Package downloaded, {1:0.000} sec", done, ts.TotalSeconds);
|
||||
resultsMsg = $"OK: {done} Package downloaded, {ts.TotalSeconds:0.000} sec";
|
||||
}
|
||||
else
|
||||
{
|
||||
// scarico singolo target...
|
||||
UpdateMan.obj.downloadLatest(updateUrl(caller), localDownloadPath(caller), caller);
|
||||
resultsMsg = string.Format("OK: {0} DOWNLOADED | {1} --> {2}", caller, updateUrl(caller), localDownloadPath(caller));
|
||||
// calcolo elapsed time come TimeSpan value.
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
resultsMsg = $"OK: {caller} downloaded, {ts.TotalSeconds:0.000} sec | {updateUrl(caller)} --> {localDownloadPath(caller)}";
|
||||
}
|
||||
}
|
||||
// aggiorno messaggio
|
||||
|
||||
Reference in New Issue
Block a user