protected void OnFileContentProgressReport(long current, long total) { //consider skipping a number of calls for performance. We don't ned to report b ack to the UI every chunk uploaded. //The caller is in the request thread. Action <long, long> action = (c, t) => { var arg = new ProgressReportEventArgs() { Current = c, Total = t }; var perc = arg.Percentage; if (perc == 0 || perc != lastFileContentProgressReport) { lastFileContentProgressReport = perc; if (fileContentProgressReport != null) { fileContentProgressReport(arg); } } }; this.dispatcher.BeginInvoke(action, current, total); }
protected void OnFileContentProgressReport(long current, long total) { //consider skipping a number of calls for performance. We don't ned to report b ack to the UI every chunk uploaded. //The caller is in the request thread. Action<long, long> action = (c, t) => { var arg = new ProgressReportEventArgs() { Current = c, Total = t }; var perc = arg.Percentage; if (perc == 0 || perc != lastFileContentProgressReport) { lastFileContentProgressReport = perc; if (fileContentProgressReport != null) fileContentProgressReport(arg); } }; this.dispatcher.BeginInvoke(action, current, total); }
void utility_FileContentProgressReport(ProgressReportEventArgs e) { contentProgressCalls++; HtmlPage.Window.Invoke(currentSettings.ScriptContentProgressHandler, e.Percentage, e.Message); }
void utility_FileSequenceProgressReport(ProgressReportEventArgs e) { sequenceProgressCalls++; HtmlPage.Window.Invoke(currentSettings.ScriptSequenceProgressHandler, e.Percentage, e.Message); }
void utility_FileSequenceProgressReport(ProgressReportEventArgs e) { sequenceProgressCalls++; HtmlPage.Window.Invoke(currentSettings.ScriptSequenceProgressHandler, e.Percentage); }
void utility_FileContentProgressReport(ProgressReportEventArgs e) { contentProgressCalls++; HtmlPage.Window.Invoke(currentSettings.ScriptContentProgressHandler, e.Percentage); }