21 lines
582 B
C#
21 lines
582 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
using JD.Core;
|
|
|
|
namespace JD.WPF.Converters
|
|
{
|
|
public class TimeSpanToStringConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
TimeSpan timeSpan = (TimeSpan)value;
|
|
return timeSpan.ToReadableString();
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
}
|
|
}
|