71 lines
2.3 KiB
VB.net
71 lines
2.3 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.Drawing.Design
|
|
Imports System.Globalization
|
|
|
|
Module ModuleFinalIndexProperties
|
|
|
|
Public Class FinalIndexProperties
|
|
<Category("Allgemein")>
|
|
<[ReadOnly](True)>
|
|
Public Property GUID As Integer
|
|
<Category("Allgemein")>
|
|
<[ReadOnly](True)>
|
|
Public Property ConnectionId As Integer
|
|
|
|
<Category("Sonstiges")>
|
|
Public Property Description As String
|
|
<Category("Sonstiges")>
|
|
Public Property Active As Boolean
|
|
|
|
''' <summary>
|
|
''' Eigenschaft, die den SQL Editor anzeigt
|
|
''' </summary>
|
|
<Category("Daten")>
|
|
Public Property SQLCommand As SQLValue
|
|
<Category("Daten")>
|
|
Public Property StaticValue As String
|
|
|
|
''' <summary>
|
|
''' Eigenschaft, die eine Liste von Indicies anzeigt
|
|
''' </summary>
|
|
<Category("Index")>
|
|
<TypeConverter(GetType(IndexListConverter))>
|
|
Public Property IndexName As String
|
|
<Category("Index")>
|
|
Public Property VectorIndex As Boolean
|
|
|
|
''' <summary>
|
|
''' Diese Eigenschaft enthält die auswählbaren Indicies, die für das Control verfügbar sind. Wird nicht direkt angezeigt.
|
|
''' </summary>
|
|
<Browsable(False)>
|
|
Public Property Indicies As List(Of String)
|
|
|
|
|
|
|
|
Public Class IndexListConverter
|
|
Inherits TypeConverter
|
|
|
|
Public Overrides Function GetStandardValuesSupported(context As ITypeDescriptorContext) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
Public Overrides Function GetStandardValues(context As ITypeDescriptorContext) As StandardValuesCollection
|
|
Dim indexList = DirectCast(context.Instance, FinalIndexProperties).Indicies
|
|
Dim values As New StandardValuesCollection(indexList)
|
|
Return values
|
|
End Function
|
|
|
|
Public Overrides Function ConvertTo(context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object
|
|
If IsNothing(value) Then
|
|
Return ""
|
|
Else
|
|
Return value.ToString()
|
|
End If
|
|
End Function
|
|
End Class
|
|
|
|
End Class
|
|
|
|
|
|
End Module
|