Example #1
0
        protected virtual void OnProgressChanged(IntPtr converter, int progress)
        {
            string progressDescription = PechkinStatic.GetProgressDescription(converter);

            if (_log.IsTraceEnabled)
            {
                _log.Trace("T:" + Thread.CurrentThread.Name + " Conversion Progress Changed: (" + progress + ") " + progressDescription);
            }

            ProgressChangedEventHandler handler = ProgressChanged;

            try
            {
                handler?.Invoke(this, progress, progressDescription);
            }
            catch (Exception e)
            {
                _log.Warn("T:" + Thread.CurrentThread.Name + " Exception in Progress event handler", e);
            }
        }
Example #2
0
        protected virtual void OnProgressChanged(IntPtr converter, int progress)
        {
            string progressDescription = PechkinStatic.GetProgressDescription(converter);

            Tracer.Trace("T:" + Thread.CurrentThread.Name + " Conversion Progress Changed: (" + progress + ") " + progressDescription);

            ProgressChangedEventHandler handler = this.ProgressChanged;

            try
            {
                if (handler != null)
                {
                    handler(this, progress, progressDescription);
                }
            }
            catch (Exception e)
            {
                Tracer.Warn("T:" + Thread.CurrentThread.Name + " Exception in Progress event handler", e);
            }
        }