Exemple #1
0
        protected virtual void OnPhaseChanged(IntPtr converter)
        {
            int    phaseNumber      = PechkinStatic.GetPhaseNumber(converter);
            string phaseDescription = PechkinStatic.GetPhaseDescription(converter, phaseNumber);

            if (_log.IsTraceEnabled)
            {
                _log.Trace("T:" + Thread.CurrentThread.Name + " Conversion Phase Changed: #" + phaseNumber + " " + phaseDescription);
            }

            PhaseChangedEventHandler handler = PhaseChanged;

            try
            {
                handler?.Invoke(this, phaseNumber, phaseDescription);
            }
            catch (Exception e)
            {
                _log.Warn("T:" + Thread.CurrentThread.Name + " Exception in PhaseChange event handler", e);
            }
        }
Exemple #2
0
        protected virtual void OnPhaseChanged(IntPtr converter)
        {
            int    phaseNumber      = PechkinStatic.GetPhaseNumber(converter);
            string phaseDescription = PechkinStatic.GetPhaseDescription(converter, phaseNumber);

            Tracer.Trace("T:" + Thread.CurrentThread.Name + " Conversion Phase Changed: #" + phaseNumber + " " + phaseDescription);

            PhaseChangedEventHandler handler = this.PhaseChanged;

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