first edit

This commit is contained in:
Курнат Андрей
2026-01-31 16:11:36 +03:00
commit f0e11d6379
148 changed files with 6986 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
using System;
using System.Windows.Data;
using System.Globalization;
namespace XLIMS.MVVM.Converters
{
[ValueConversion(typeof(Boolean), typeof(String))]
public class BoolConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
try
{
Boolean data = (Boolean)value;
return data;
}
catch { return value; }
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
string strValue = value.ToString();
Boolean resultData;
if (Boolean.TryParse(strValue, out resultData))
{
return resultData;
}
return value;
}
}
}