jj Designer Update
This commit is contained in:
30
app/DD_PM_WINDREAM/ClassSQLEditor.vb
Normal file
30
app/DD_PM_WINDREAM/ClassSQLEditor.vb
Normal file
@@ -0,0 +1,30 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing.Design
|
||||
Imports System.Windows.Forms.Design
|
||||
Imports DD_PM_WINDREAM.InputProperties
|
||||
|
||||
Public Class ClassSQLEditor
|
||||
Inherits UITypeEditor
|
||||
|
||||
Public Overrides Function GetEditStyle(context As ITypeDescriptorContext) As UITypeEditorEditStyle
|
||||
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 frmSQL_DESIGNER()
|
||||
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
|
||||
Reference in New Issue
Block a user