KTDReaderGUI Init + BeWo.Styles seperates Projekt -> Eigene Testanwendungen

This commit is contained in:
2025-02-06 15:16:00 +01:00
parent 0580d0117f
commit a4049e488a
35 changed files with 1831 additions and 6 deletions

View File

@@ -0,0 +1,37 @@
using BS.Shared.Core;
using System;
using System.Globalization;
using System.Windows.Data;
namespace BeWo.Styles.Converters
{
public class EnumTranslationConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is Enum e)
{
if (EnumTranslations.Wohnhilfe2Translation.TryGetValue(e, out string v))
{
return v;
}
// RE:
// EnumTranslationConverter, aber betrachtet nicht alle?
// Brauche hier eig nur EnumTranslations.Gkv2Translation
if (EnumTranslations.AllTranslations.TryGetValue(e, out string vv))
{
return vv;
}
return e;
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}