20220510_191_upperpc/AutomaticApp/Common/BtnConvert.cs
2023-07-27 10:57:34 +08:00

42 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace AutomaticApp.Common
{
public class BtnConvert : IMultiValueConverter
{
public static object ConvertObject;
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
string result = "";
for (int i = 0; i < values.Length; i++)
{
if (values[i] == null)
break;
if (i != values.Length - 1)
{
result += values[i].ToString() + ",";
}
else
{
result += values[i].ToString();
}
}
return result;
}
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}