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