Files
6098-5/Cowain.Preheat.Common/Converter/IntToStringConverter.cs
T
2026-05-28 22:11:13 +08:00

42 lines
1.1 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 Cowain.Preheat.Common.Converter
{
public class IntToStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
return string.Empty;
string str = value.ToString();
switch (str)
{
case "0":
str = string.Empty;
break;
case "1":
str = "待上传";
break;
case "2":
str = "上传完毕";
break;
default:
break;
}
return str;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}