|
Imports Basics
Imports MidRange
Imports IMidRange
Imports System.Drawing
Imports System.ComponentModel
Imports System.Text
<DefaultProperty("Singularity")> _
Public Class SingularityCollection
Inherits CollectionBase
Implements ICustomTypeDescriptor
Public ReadOnly Property Singularity(ByVal Index As Integer) As Singularity
Get
Return Me.List(Index)
End Get
End Property
Public Sub Add(ByVal Sing As Singularity)
Me.List.Add(Sing)
End Sub
Public Sub Remove(ByVal Sing As Singularity)
Me.List.Remove(Sing)
End Sub
Public Function GetAttributes() As System.ComponentModel.AttributeCollection Implements System.ComponentModel.ICustomTypeDescriptor.GetAttributes
Return TypeDescriptor.GetAttributes(Me, True)
End Function
Public Function GetClassName() As String Implements System.ComponentModel.ICustomTypeDescriptor.GetClassName
Return TypeDescriptor.GetClassName(Me, True)
End Function
Public Function GetComponentName() As String Implements System.ComponentModel.ICustomTypeDescriptor.GetComponentName
Return TypeDescriptor.GetComponentName(Me, True)
End Function
Public Function GetConverter() As System.ComponentModel.TypeConverter Implements System.ComponentModel.ICustomTypeDescriptor.GetConverter
Return TypeDescriptor.GetConverter(Me, True)
End Function
Public Function GetDefaultEvent() As System.ComponentModel.EventDescriptor Implements System.ComponentModel.ICustomTypeDescriptor.GetDefaultEvent
Return TypeDescriptor.GetDefaultEvent(Me, True)
End Function
Public Function GetDefaultProperty() As System.ComponentModel.PropertyDescriptor Implements System.ComponentModel.ICustomTypeDescriptor.GetDefaultProperty
Return TypeDescriptor.GetDefaultProperty(Me, True)
End Function
Public Function GetEditor(ByVal editorBaseType As System.Type) As Object Implements ICustomTypeDescriptor.GetEditor
Return TypeDescriptor.GetEditor(Me, editorBaseType, True)
End Function
Public Overloads Function GetEvents() As EventDescriptorCollection Implements ICustomTypeDescriptor.GetEvents
Return TypeDescriptor.GetEvents(Me, True)
End Function
Public Overloads Function GetEvents(ByVal attributes() As System.Attribute) As EventDescriptorCollection Implements ICustomTypeDescriptor.GetEvents
Return TypeDescriptor.GetEvents(Me, attributes, True)
End Function
Public Function GetPropertyOwner(ByVal pd As PropertyDescriptor) As Object Implements ICustomTypeDescriptor.GetPropertyOwner
Return Me
End Function
Public Overloads Function GetProperties(ByVal attributes() As Attribute) As PropertyDescriptorCollection Implements ICustomTypeDescriptor.GetProperties
Return GetProperties
End Function
Public Overloads Function GetProperties() As PropertyDescriptorCollection Implements ICustomTypeDescriptor.GetProperties
Dim i As Integer
Dim pds As PropertyDescriptorCollection = New PropertyDescriptorCollection(Nothing)
'Iterate the list of employees
For i = 0 To Me.List.Count - 1
'// For each employee create a property descriptor
'// and add it to the
'// PropertyDescriptorCollection instance
Dim pd As SingCollectionPropertyDescriptor = New SingCollectionPropertyDescriptor(Me, i)
pds.Add(pd)
Next
Return pds
End Function
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.