ZooFlow: PropertyDialog, ContextMenu, Async Queries in Database
This commit is contained in:
68
GUIs.Common/ObjectPropertyDialog/PropertyControls.vb
Normal file
68
GUIs.Common/ObjectPropertyDialog/PropertyControls.vb
Normal file
@@ -0,0 +1,68 @@
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraLayout
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.ZooFlow
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
|
||||
Public Class PropertyControls
|
||||
Private _LogConfig As LogConfig
|
||||
Private _Logger As Logger
|
||||
Private _Db As MSSQLServer
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, Database As MSSQLServer)
|
||||
_LogConfig = LogConfig
|
||||
_Logger = LogConfig.GetLogger()
|
||||
_Db = Database
|
||||
End Sub
|
||||
|
||||
Public Function GetControlForAttribute(Attribute As Attribute) As BaseEdit
|
||||
Select Case Attribute.TypeName
|
||||
Case "BIT"
|
||||
Dim oCheckboxEdit As New CheckEdit With {
|
||||
.Name = Attribute.ID,
|
||||
.Text = Attribute.Title
|
||||
}
|
||||
Return oCheckboxEdit
|
||||
|
||||
Case "DATE"
|
||||
Dim oDateEdit As New DateEdit With {
|
||||
.Name = Attribute.ID
|
||||
}
|
||||
Return oDateEdit
|
||||
|
||||
Case "BIG INTEGER"
|
||||
Dim oTextEdit As New TextEdit With {
|
||||
.Name = Attribute.ID
|
||||
}
|
||||
Return oTextEdit
|
||||
|
||||
Case "DECIMAL"
|
||||
Dim oTextEdit As New TextEdit With {
|
||||
.Name = Attribute.ID
|
||||
}
|
||||
Return oTextEdit
|
||||
|
||||
Case "FLOAT"
|
||||
Dim oTextEdit As New TextEdit With {
|
||||
.Name = Attribute.ID
|
||||
}
|
||||
Return oTextEdit
|
||||
|
||||
Case "VECTOR STRING"
|
||||
Dim oLookupEdit As New LookupControl2 With {
|
||||
.Name = Attribute.ID,
|
||||
.MultiSelect = True,
|
||||
.[ReadOnly] = True
|
||||
}
|
||||
Return oLookupEdit
|
||||
|
||||
Case Else
|
||||
Dim oTextEdit As New TextEdit With {
|
||||
.Name = Attribute.ID
|
||||
}
|
||||
Return oTextEdit
|
||||
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user