Index: Core/Gui/src/Core.Gui/Forms/Log/MessageWindow.cs =================================================================== diff -u -r52a22c8f41eec6cc845cbcedd5252a108933cc3f -rd6d394517235c3fa20bd08f81d7a4e0e0ac575a1 --- Core/Gui/src/Core.Gui/Forms/Log/MessageWindow.cs (.../MessageWindow.cs) (revision 52a22c8f41eec6cc845cbcedd5252a108933cc3f) +++ Core/Gui/src/Core.Gui/Forms/Log/MessageWindow.cs (.../MessageWindow.cs) (revision d6d394517235c3fa20bd08f81d7a4e0e0ac575a1) @@ -45,14 +45,14 @@ private const string warningLevelUnicode = "\uE90A"; private const string informationLevelUnicode = "\uE909"; private const string debugLevelUnicode = "\uE90C"; - + private static readonly PrivateFontCollection privateFontCollection = new PrivateFontCollection(); private static readonly Font font = FontHelper.CreateFont(Resources.Symbols, privateFontCollection); - + private readonly IWin32Window dialogParent; - private readonly Dictionary levelImageName; + private readonly Dictionary levelUnicodeLookup; private readonly ConcurrentQueue newMessages = new ConcurrentQueue(); - + private bool filtering; /// @@ -67,7 +67,7 @@ InitializeComponent(); // order is the same as in log4j Level (check sources of log4net) - levelImageName = new Dictionary + levelUnicodeLookup = new Dictionary { [Level.Off.ToString()] = errorLevelUnicode, [Level.Emergency.ToString()] = errorLevelUnicode, @@ -128,7 +128,7 @@ newMessages.Enqueue(new MessageData { - ImageName = level.ToString(), + Level = level, Time = time, ShortMessage = shortMessage, FullMessage = message @@ -165,7 +165,7 @@ { DataRow row = Messages.NewRow(); - row[0] = msg.ImageName; + row[0] = msg.Level; row[1] = msg.Time; row[2] = msg.ShortMessage; row[3] = msg.FullMessage; @@ -274,9 +274,9 @@ private class MessageData { /// - /// Gets or sets the image representation of the logging level. + /// Gets or sets the logging level. /// - public string ImageName { get; set; } + public Level Level { get; set; } /// /// Gets or sets the time when the message was logged. @@ -348,10 +348,9 @@ return; } - // Dataset stores image-name instead of actual image, therefore we map to - // actual image during formatting. + // Level is stored instead of unicode, therefore we map to actual unicode during formatting. var level = (string) e.Value; - e.Value = levelImageName[level]; + e.Value = levelUnicodeLookup[level]; } #endregion