public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var item = value as DownloadState?;
if (item == null) return null;
if (item.Value == DownloadState.Downloading)
{
return LanguagesManager.Instance.DownloadState_Downloading;
}
else if (item.Value == DownloadState.Decoding)
{
return LanguagesManager.Instance.DownloadState_Decoding;
}
else if (item.Value == DownloadState.ParityDecoding)
{
return LanguagesManager.Instance.DownloadState_ParityDecoding;
}
else if (item.Value == DownloadState.Completed)
{
return LanguagesManager.Instance.DownloadState_Completed;
}
else if (item.Value == DownloadState.Error)
{
return LanguagesManager.Instance.DownloadState_Error;
}
return "";
}