namespace GDNXFD.Alert.Config.Converters
{
using System;
using System.IO;
using System.Windows.Data;
using System.Windows.Media.Imaging;
///
/// Byte to image converter
///
public class StationIdToTextConverter : IValueConverter
{
///
/// Convert a byte array to an image.
///
///
///
///
///
///
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value != null)
{
string code = value.ToString().Trim();
switch (code)
{
case "MHS_FDC":
return "麻黄山风电场";
case "NSS_FDC":
return "牛首山风电场";
case "QS_FDC":
return "青山风电场";
case "SBQ_FDC":
return "石板泉风电场";
case "XS_FDC":
return "香山风电场";
case "DWK_GDC":
return "大武口光伏电站";
case "PL_GDC":
return "平罗光伏电站";
case "MCH_GDC":
return "马场湖光伏电站";
case "XH_GDC":
return "宣和光伏电站";
}
}
return "未知";
}
///
/// Convert an image to a byte array
///
///
///
///
///
///
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}