Esempio n. 1
0
        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);
        }
Esempio n. 2
0
		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);
		}
Esempio n. 3
0
 void utility_FileContentProgressReport(ProgressReportEventArgs e)
 {
     contentProgressCalls++;
     HtmlPage.Window.Invoke(currentSettings.ScriptContentProgressHandler, e.Percentage, e.Message);
 }
Esempio n. 4
0
		void utility_FileSequenceProgressReport(ProgressReportEventArgs e)
		{
			sequenceProgressCalls++;
			HtmlPage.Window.Invoke(currentSettings.ScriptSequenceProgressHandler, e.Percentage, e.Message);
		}
Esempio n. 5
0
 void utility_FileSequenceProgressReport(ProgressReportEventArgs e)
 {
     sequenceProgressCalls++;
     HtmlPage.Window.Invoke(currentSettings.ScriptSequenceProgressHandler, e.Percentage);
 }
Esempio n. 6
0
 void utility_FileContentProgressReport(ProgressReportEventArgs e)
 {
     contentProgressCalls++;
     HtmlPage.Window.Invoke(currentSettings.ScriptContentProgressHandler, e.Percentage);
 }