-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathLevelToColorConverter.cs
More file actions
38 lines (32 loc) · 1018 Bytes
/
Copy pathLevelToColorConverter.cs
File metadata and controls
38 lines (32 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
namespace SyncProLogViewer
{
using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
public class LevelToColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string str = value as string;
if (str == "ERROR")
{
return Brushes.Red;
}
if (str == "WARN")
{
return Brushes.DarkOrange;
//return new SolidColorBrush(Color.FromRgb(0xCC, 0xCC, 0x00));
}
if (str == "VERB" || str == "DEBUG")
{
return new SolidColorBrush(Color.FromRgb(0xaa, 0xaa, 0xaa));
}
return Brushes.Black;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}