csharpdeeb25a2 | 1 | using System.Globalization; |
| 2 | using Avalonia.Data.Converters; |
| 3 | using Avalonia.Media; |
| 4 | using CascadeIDE.Cockpit.Channels.Eicas; |
| 5 | using CascadeIDE.Cockpit.PrimitivesKit; |
| 6 | |
| 7 | namespace CascadeIDE.Views; |
| 8 | |
| 9 | public sealed class EicasSeverityToBrushConverter : IValueConverter |
| 10 | { |
| 11 | public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) => |
| 12 | value is EicasSeverity s |
| 13 | ? new SolidColorBrush(CockpitPrimitivesPalette.Eicas.Foreground(s)) |
| 14 | : Brushes.Gray; |
| 15 | |
| 16 | public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) => |
| 17 | throw new NotSupportedException(); |
| 18 | } |
| 19 | |
View only · write via MCP/CIDE