12-11-13, 04:24 PM
السلام عليكم
المشاركة للاخ الكريم ابو رائد
الكود
المشاركة للاخ الكريم ابو رائد
الكود
كود :
<TypeConverter(GetType(UpNormal.UpNormalypeConverter))> _
<Editor(GetType(UpNormalTypeEditor), GetType(UITypeEditor))> _
Public Class UpNormal
Inherits Properties
Class UpNormalypeConverter
Inherits ExpandableObjectConverter
Public Overrides Function ConvertTo(ByVal context As ITypeDescriptorContext, ByVal culture As System.Globalization.CultureInfo, ByVal value As Object, ByVal destType As Type) As Object
If destType Is GetType(String) AndAlso TypeOf value Is UpNormal Then
Dim tmp As UpNormal = TryCast(value, UpNormal)
Return tmp.Delta.X & ", " & tmp.Delta.Y
End If
Return MyBase.ConvertTo(context, culture, value, destType)
End Function
End Class
End Class