تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] شرح جزء من كود
#1
السلام عليكم
المشاركة للاخ الكريم ابو رائد


الكود


كود :
<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
الرد }}}
تم الشكر بواسطة:
#2
للرفع
الرد }}}
تم الشكر بواسطة:


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم