jj 03.02 Rename RecordOrganiser to RecordOrganizer

This commit is contained in:
JenneJ
2017-02-03 13:44:43 +01:00
parent f3c8415aa6
commit e772d0cd57
547 changed files with 5010 additions and 61153 deletions

View File

@@ -0,0 +1,60 @@
Imports System.ComponentModel
Imports System.Drawing.Design
Imports System.Windows.Forms
Imports System.Windows.Forms.Design
Public Class ClassSQLEditor
Inherits UITypeEditor
Public Overrides Function GetEditStyle(context As ITypeDescriptorContext) As UITypeEditorEditStyle
'Return MyBase.GetEditStyle(context)
Return UITypeEditorEditStyle.Modal
End Function
Public Overrides Function EditValue(context As ITypeDescriptorContext, provider As IServiceProvider, value As Object) As Object
'Return MyBase.EditValue(context, provider, value)
Dim svc As IWindowsFormsEditorService = TryCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService)
Dim SQLSTring As String = DirectCast(value, SQLValue).Value
If svc IsNot Nothing AndAlso SQLSTring IsNot Nothing Then
Using Form As New frmSQLEditor()
Form.Value = SQLSTring
If svc.ShowDialog(Form) = DialogResult.OK Then
Dim sql As New SQLValue(Form.Value)
value = sql
End If
End Using
End If
Return value
End Function
End Class
<Editor(GetType(ClassSQLEditor), GetType(UITypeEditor))> _
<TypeConverter(GetType(SQLTypeConverter))> _
Public Class SQLValue
Private _value As String
Public Sub New(value As String)
Me.Value = value
End Sub
Public Property Value As String
Get
Return _value
End Get
Set(value As String)
_value = value
End Set
End Property
End Class
Public Class SQLTypeConverter
Inherits TypeConverter
Public Overrides Function ConvertTo(context As ITypeDescriptorContext, culture As Globalization.CultureInfo, value As Object, destinationType As Type) As Object
'Return MyBase.ConvertTo(context, culture, value, destinationType)
Dim sqlvalue As SQLValue = DirectCast(value, SQLValue)
Return sqlvalue.Value
End Function
End Class