20240301_JSEQ_upperpc/JiangsuEarthquakeNow/JiangsuEarthquake/Common/BtnConvert.cs

41 lines
1.1 KiB
C#
Raw Permalink Normal View History

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace JiangsuEarthquake.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();
}
}
}