private void OnProgressChanged(IntPtr converter, int progress)
        {
            string progressDescription = Toolset.GetProgressDescription(converter);

            Tracer.Trace(string.Format("T:{0} Conversion Progress Changed: ({1}) {2}", Thread.CurrentThread.Name, progress, progressDescription));

            try
            {
                var args = new ProgressChangeEventArgs
                {
                    Document            = ProcessingDocument,
                    Progress            = progress,
                    ProgressDescription = progressDescription
                };

                if (ProgressChange != null)
                {
                    ProgressChange(this, args);
                }
            }
            catch (Exception e)
            {
                Tracer.Warn(string.Format("T:{0} Exception in Progress event handler", Thread.CurrentThread.Name), e);
            }
        }
Exemplo n.º 2
0
        private void OnProgressChanged(IntPtr converter, int progress)
        {
            string progressDescription = Toolset.GetProgressDescription(converter);

            Tracer.Trace(string.Format("T:{0} Conversion Progress Changed: ({1}) {2}", Thread.CurrentThread.Name, progress, progressDescription));

            try
            {
                var args = new ProgressChangeEventArgs
                {
                    Document = ProcessingDocument,
                    Progress = progress,
                    ProgressDescription = progressDescription
                };

                if (ProgressChange != null)
                {
                    ProgressChange(this, args);
                }
            }
            catch (Exception e)
            {
                Tracer.Warn(string.Format("T:{0} Exception in Progress event handler", Thread.CurrentThread.Name), e);
            }
        }