private void HandleLogMessage(object sender, LogMessageEventArgs e)
        {
            var handler = LogMessageHandler;

            if (handler != null)
            {
                handler(this, new LogMessageEventArgs(e.LogMessage));
            }
        }
示例#2
0
        private void HandleLogMessage(object sender, LogMessageEventArgs e)
        {
            var formattedTime = DateTime.Now.ToString("mm:ss.f");

            var logMessage = string.Format("{0}: {1}", formattedTime, e.LogMessage);

            Action action = () =>
            {
                UpdateMessage(logMessage);
            };

            Dispatcher.BeginInvoke(action);
        }