mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-14 05:12:09 +08:00
20 lines
732 B
C#
20 lines
732 B
C#
using Sheas_Cealer.Consts;
|
|
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace Sheas_Cealer.Convs;
|
|
|
|
internal class SettingsLangsButtonContentConv : IValueConverter
|
|
{
|
|
public object Convert(object? value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
bool? isEnglishLang = value as bool?;
|
|
|
|
return isEnglishLang.HasValue ?
|
|
isEnglishLang.GetValueOrDefault() ? SettingsConst.LangsButtonEnglishLangContent : SettingsConst.LangsButtonChineseLangContent :
|
|
SettingsConst.LangsButtonInheritLangContent;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new NotImplementedException();
|
|
} |