49 lines
1.8 KiB
C#
49 lines
1.8 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using System.IO;
|
|
using System.Windows.Data;
|
|
using DTS.Common.Classes.Groups;
|
|
|
|
namespace DTS.Common.Converters
|
|
{
|
|
|
|
/// <summary>
|
|
/// Converter which converts percentage to String.
|
|
/// </summary>
|
|
public class GroupImportErrorToStringConverter : IValueConverter
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="value">The decimal value to convert. This value can be a standard decimal value or a nullable decimal value.</param>
|
|
/// <param name="targetType">This parameter is not used.</param>
|
|
/// <param name="parameter">This parameter is not used.</param>
|
|
/// <param name="culture">The culture to use in the format operation.</param>
|
|
/// <returns>The value to be passed to the target dependency property.</returns>
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
var error = value as GroupImportError;
|
|
|
|
if (null == error)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
return error.ExtraInfo;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Conversion back is not supported.
|
|
/// </summary>
|
|
/// <param name="value">A currency value.</param>
|
|
/// <param name="targetType">This parameter is not used.</param>
|
|
/// <param name="parameter">This parameter is not used.</param>
|
|
/// <param name="culture">This parameter is not used.</param>
|
|
/// <returns>The value to be passed to the source object.</returns>
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|