Initial commit

This commit is contained in:
2026-11-16 18:25:21 +08:00
commit c7264cc50d
229 changed files with 33543 additions and 0 deletions
@@ -0,0 +1,20 @@
using System.Globalization;
using System.Windows.Data;
using Leiren.Erp.Client.Pages;
namespace Leiren.Erp.Client.Controls;
/// <summary>Shows stored enum / flag values in Chinese (part and product types, yes/no).</summary>
public sealed class DisplayTextConverter : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) => value switch
{
bool flag => flag ? "是" : "否",
string text => ProductPage.TypeName(text),
null => "-",
_ => value.ToString() ?? "-",
};
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
=> throw new NotSupportedException();
}