![]() ![]() ![]() Return New TV_3DVECTOR(CSng(fields(0)), CSng(fields(1)), CSng(fields(2))) Public Overloads Overrides Function ConvertFrom(ByVal context As ITypeDescriptorContext, ByVal culture As, ByVal value As Object) As Object Public Overloads Overrides Function CanConvertTo(ByVal context As ITypeDescriptorContext, ByVal destinationType As System.Type) As BooleanĮlseIf (destinationType.Equals(GetType(Vec3Converter))) Then Public Overloads Overrides Function CanConvertFrom(ByVal context As ITypeDescriptorContext, ByVal sourceType As System.Type) As BooleanĮlseIf (sourceType.Equals(GetType(Vec3Converter))) Then If refFrame Is Nothing Then Return New TV_3DVECTOR(Single.NaN, Single.NaN, Single.NaN) Public Property Location() As clsPropsVec3 If refFrame Is Nothing Then Exit Property Public Sub New(ByVal Frame As clsFrame, ByVal bolChangable As Boolean) Return TypeDescriptor.GetProperties(value) Public Overloads Overrides Function GetProperties(ByVal context As ITypeDescriptorContext, ByVal value As Object, ByVal Attribute() As Attribute) As PropertyDescriptorCollection Public Overloads Overrides Function GetPropertiesSupported(ByVal context As ITypeDescriptorContext) As Boolean Return MyBase.ConvertTo(context, culture, value, destinationType) Public Overloads Overrides Function ConvertTo(ByVal context As, ByVal culture As, ByVal value As Object, ByVal destinationType As System.Type) As Object Return MyBase.ConvertFrom(context, culture, value) Throw New InvalidCastException(CStr(value))ĮlseIf (TypeOf value Is TV_3DVECTOR) Then Return New clsPropsVec3(New TV_3DVECTOR(CSng(fields(0)), CSng(fields(1)), CSng(fields(2)))) Public Overloads Overrides Function ConvertFrom(ByVal context As, ByVal culture As, ByVal value As Object) As Objectĭim fields() As String = txt.Split(CChar(",")) Return MyBase.CanConvertTo(context, destinationType) If (destinationType.Equals(GetType(String))) ThenĮlseIf (destinationType.Equals(GetType(clsPropsVec3))) Then Public Overloads Overrides Function CanConvertTo(ByVal context As, ByVal destinationType As System.Type) As Boolean Return MyBase.CanConvertFrom(context, sourceType) If (sourceType.Equals(GetType(String))) ThenĮlseIf (sourceType.Equals(GetType(clsPropsVec3))) Then ![]() Public Overloads Overrides Function CanConvertFrom(ByVal context As, ByVal sourceType As System.Type) As Boolean Public Overrides Function ToString() As String Public Shared Widening Operator CType(ByVal props As clsPropsVec3) As TV_3DVECTOR Public Shared Widening Operator CType(ByVal Vec As TV_3DVECTOR) As clsPropsVec3 Refvec = New TV_3DVECTOR(vec.x, vec.y, vec.z) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |