/// <summary> /// 重写父类,这里不需要关注 /// </summary> /// <param oldName="context"></param> /// <returns></returns> public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { SVBitmapArray bitmap = value as SVBitmapArray; if (bitmap == null) { return(base.ConvertFrom(context, culture, value)); } return(bitmap); }
/// <summary> /// 重写父类,这里不需要关注 /// </summary> /// <param oldName="context"></param> /// <returns></returns> public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { SVBitmapArray bitmap = value as SVBitmapArray; if (bitmap == null) { return(base.ConvertTo(context, culture, value, destinationType)); } if (bitmap.BitmapArray != null) { String text = String.Format("个数:{0}", bitmap.imageArray().Count); return(text); } else { return("空!"); } }