public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
string str = value as string;
if (str != null)
{
string[] strArray = str.Split(new char[] { ',' });
if (2 == strArray.Length)
{
return new Point2D(double.Parse(strArray[0], CultureInfo.InvariantCulture), double.Parse(strArray[1], CultureInfo.InvariantCulture));
}
}
throw new ArgumentException(SuperMap.WindowsPhone.Resources.ExceptionStrings.TextParseFailed, "value");
//TODO:资源 Text Parse Failed
}
}