123456789101112131415161718192021222324252627282930313233343536 |
- using LogoForceTestApp.Modules.MainModule.Enums;
- using System;
- using System.Globalization;
- using System.Windows.Data;
- using System.Windows.Media;
- namespace LogoForceTestApp
- {
- internal class JugetoBrushConvert : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
-
- if (value is RunResultState juge)
- {
- var brush = juge switch
- {
- RunResultState.NG => Brushes.Red,
- RunResultState.OK => Brushes.Green,
- RunResultState.NOTDEFINED => Brushes.Yellow,
- _ => throw new NotImplementedException()
- };
-
- return brush;
- }
- return Brushes.Yellow;
- }
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|