diff --git a/EDMI_ClientSuite/ClassConstants.vb b/EDMI_ClientSuite/ClassConstants.vb
index 032bb7df..da07d4d5 100644
--- a/EDMI_ClientSuite/ClassConstants.vb
+++ b/EDMI_ClientSuite/ClassConstants.vb
@@ -6,6 +6,13 @@
Public Const SERVICE_MAX_CONNECTIONS = 10000
Public Const SERVICE_OPEN_TIMEOUT = 3
+ Public Const CONTROL_TEXTEDIT = "TextBox"
+ Public Const CONTROL_MEMOEDIT = "Memoedit"
+ Public Const CONTROL_COMBOEDIT = "Combobox"
+ Public Const CONTROL_CHECKEDIT = "Checkbox"
+ Public Const CONTROL_RADIOEDIT = "Radiobutton"
+ Public Const CONTROL_DATEEDIT = "Datepicker"
+
Public Const FOLDER_NAME_LAYOUT = "Layout"
Public Const ATTRIBUTE_ID_COLUMN = "RECORD_ID"
diff --git a/EDMI_ClientSuite/ClientSuite.vbproj b/EDMI_ClientSuite/ClientSuite.vbproj
index 336d8e53..73b9b4f0 100644
--- a/EDMI_ClientSuite/ClientSuite.vbproj
+++ b/EDMI_ClientSuite/ClientSuite.vbproj
@@ -458,6 +458,14 @@
DDEDMService
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb
index 7ab76bce..03f929b7 100644
--- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb
+++ b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.Designer.vb
@@ -25,15 +25,28 @@ Partial Class frmFormDesigner
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.LayoutControlMain = New DevExpress.XtraLayout.LayoutControl()
Me.LayoutControlGroupMain = New DevExpress.XtraLayout.LayoutControlGroup()
- Me.ToolboxControl1 = New DevExpress.XtraToolbox.ToolboxControl()
- Me.ToolboxGroup1 = New DevExpress.XtraToolbox.ToolboxGroup()
+ Me.ToolboxControlMain = New DevExpress.XtraToolbox.ToolboxControl()
+ Me.ToolboxGroupMain = New DevExpress.XtraToolbox.ToolboxGroup()
Me.ToolboxItemTextbox = New DevExpress.XtraToolbox.ToolboxItem()
- Me.ToolboxItemMemo = New DevExpress.XtraToolbox.ToolboxItem()
+ Me.ToolboxItemMemoedit = New DevExpress.XtraToolbox.ToolboxItem()
+ Me.ToolboxItemDatepicker = New DevExpress.XtraToolbox.ToolboxItem()
+ Me.ToolboxItemCombobox = New DevExpress.XtraToolbox.ToolboxItem()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
- Me.ToolboxItem1 = New DevExpress.XtraToolbox.ToolboxItem()
+ Me.XtraTabControl1 = New DevExpress.XtraTab.XtraTabControl()
+ Me.XtraTabPageControls = New DevExpress.XtraTab.XtraTabPage()
+ Me.XtraTabPageProperties = New DevExpress.XtraTab.XtraTabPage()
+ Me.PropertyGridControl1 = New DevExpress.XtraVerticalGrid.PropertyGridControl()
+ Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl()
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlMain, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.XtraTabControl1.SuspendLayout()
+ Me.XtraTabPageControls.SuspendLayout()
+ Me.XtraTabPageProperties.SuspendLayout()
+ CType(Me.PropertyGridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SplitContainerMain.SuspendLayout()
Me.SuspendLayout()
'
'RibbonControl
@@ -61,12 +74,17 @@ Partial Class frmFormDesigner
'
'LayoutControlMain
'
- Me.LayoutControlMain.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
+ Me.LayoutControlMain.AllowDrop = True
+ Me.LayoutControlMain.BackColor = System.Drawing.Color.Transparent
Me.LayoutControlMain.Dock = System.Windows.Forms.DockStyle.Fill
- Me.LayoutControlMain.Location = New System.Drawing.Point(0, 146)
+ Me.LayoutControlMain.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlMain.Name = "LayoutControlMain"
+ Me.LayoutControlMain.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(706, 255, 650, 400)
+ Me.LayoutControlMain.OptionsCustomizationForm.ShowLayoutTreeView = False
+ Me.LayoutControlMain.OptionsCustomizationForm.ShowLoadButton = False
+ Me.LayoutControlMain.OptionsCustomizationForm.ShowSaveButton = False
Me.LayoutControlMain.Root = Me.LayoutControlGroupMain
- Me.LayoutControlMain.Size = New System.Drawing.Size(658, 362)
+ Me.LayoutControlMain.Size = New System.Drawing.Size(624, 362)
Me.LayoutControlMain.TabIndex = 2
Me.LayoutControlMain.Text = "LayoutControl1"
'
@@ -74,71 +92,142 @@ Partial Class frmFormDesigner
'
Me.LayoutControlGroupMain.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
Me.LayoutControlGroupMain.GroupBordersVisible = False
- Me.LayoutControlGroupMain.Name = "LayoutControlGroupMain"
- Me.LayoutControlGroupMain.Size = New System.Drawing.Size(658, 362)
+ Me.LayoutControlGroupMain.Name = "Root"
+ Me.LayoutControlGroupMain.Size = New System.Drawing.Size(624, 362)
Me.LayoutControlGroupMain.TextVisible = False
'
- 'ToolboxControl1
+ 'ToolboxControlMain
'
- Me.ToolboxControl1.Caption = "Form Controls"
- Me.ToolboxControl1.Dock = System.Windows.Forms.DockStyle.Right
- Me.ToolboxControl1.Groups.Add(Me.ToolboxGroup1)
- Me.ToolboxControl1.Location = New System.Drawing.Point(658, 146)
- Me.ToolboxControl1.Name = "ToolboxControl1"
- Me.ToolboxControl1.OptionsView.ShowMenuButton = False
- Me.ToolboxControl1.OptionsView.ShowToolboxCaption = True
- Me.ToolboxControl1.Size = New System.Drawing.Size(212, 362)
- Me.ToolboxControl1.TabIndex = 4
- Me.ToolboxControl1.Text = "Form Controls"
+ Me.ToolboxControlMain.Caption = "Form Controls"
+ Me.ToolboxControlMain.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.ToolboxControlMain.Groups.Add(Me.ToolboxGroupMain)
+ Me.ToolboxControlMain.Location = New System.Drawing.Point(0, 0)
+ Me.ToolboxControlMain.Name = "ToolboxControlMain"
+ Me.ToolboxControlMain.OptionsMinimizing.AllowMinimizing = False
+ Me.ToolboxControlMain.OptionsView.ShowMenuButton = False
+ Me.ToolboxControlMain.OptionsView.ShowToolboxCaption = True
+ Me.ToolboxControlMain.SelectedGroup = Me.ToolboxGroupMain
+ Me.ToolboxControlMain.SelectedGroupIndex = 0
+ Me.ToolboxControlMain.Size = New System.Drawing.Size(232, 337)
+ Me.ToolboxControlMain.TabIndex = 4
+ Me.ToolboxControlMain.Text = "Form Controls"
'
- 'ToolboxGroup1
+ 'ToolboxGroupMain
'
- Me.ToolboxGroup1.BeginGroupCaption = ""
- Me.ToolboxGroup1.Caption = "ToolboxGroup1"
- Me.ToolboxGroup1.Items.Add(Me.ToolboxItemTextbox)
- Me.ToolboxGroup1.Items.Add(Me.ToolboxItemMemo)
- Me.ToolboxGroup1.Items.Add(Me.ToolboxItem1)
- Me.ToolboxGroup1.Name = "ToolboxGroup1"
+ Me.ToolboxGroupMain.BeginGroupCaption = ""
+ Me.ToolboxGroupMain.Caption = "Basis Controls"
+ Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemTextbox)
+ Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemMemoedit)
+ Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemDatepicker)
+ Me.ToolboxGroupMain.Items.Add(Me.ToolboxItemCombobox)
+ Me.ToolboxGroupMain.Name = "ToolboxGroupMain"
'
'ToolboxItemTextbox
'
Me.ToolboxItemTextbox.BeginGroupCaption = Nothing
Me.ToolboxItemTextbox.Caption = "Textbox"
+ Me.ToolboxItemTextbox.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.TextBox
Me.ToolboxItemTextbox.Name = "ToolboxItemTextbox"
+ Me.ToolboxItemTextbox.Tag = "Textbox"
'
- 'ToolboxItemMemo
+ 'ToolboxItemMemoedit
'
- Me.ToolboxItemMemo.BeginGroupCaption = Nothing
- Me.ToolboxItemMemo.Caption = "Multiline Textbox"
- Me.ToolboxItemMemo.Name = "ToolboxItemMemo"
+ Me.ToolboxItemMemoedit.BeginGroupCaption = Nothing
+ Me.ToolboxItemMemoedit.Caption = "Multiline Textbox"
+ Me.ToolboxItemMemoedit.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.TextBox
+ Me.ToolboxItemMemoedit.Name = "ToolboxItemMemoedit"
+ Me.ToolboxItemMemoedit.Tag = "Memoedit"
+ '
+ 'ToolboxItemDatepicker
+ '
+ Me.ToolboxItemDatepicker.BeginGroupCaption = Nothing
+ Me.ToolboxItemDatepicker.Caption = "Datepicker"
+ Me.ToolboxItemDatepicker.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.DatePicker
+ Me.ToolboxItemDatepicker.Name = "ToolboxItemDatepicker"
+ Me.ToolboxItemDatepicker.Tag = "Datepicker"
+ '
+ 'ToolboxItemCombobox
+ '
+ Me.ToolboxItemCombobox.BeginGroupCaption = Nothing
+ Me.ToolboxItemCombobox.Caption = "Combobox"
+ Me.ToolboxItemCombobox.ImageOptions.Image = Global.DigitalData.GUIs.ClientSuite.My.Resources.Resources.ComboBox
+ Me.ToolboxItemCombobox.Name = "ToolboxItemCombobox"
+ Me.ToolboxItemCombobox.Tag = "Combobox"
'
'RibbonPageGroup1
'
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
'
- 'ToolboxItem1
+ 'XtraTabControl1
'
- Me.ToolboxItem1.BeginGroupCaption = Nothing
- Me.ToolboxItem1.Caption = "ToolboxItem1"
- Me.ToolboxItem1.Name = "ToolboxItem1"
+ Me.XtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.XtraTabControl1.Location = New System.Drawing.Point(0, 0)
+ Me.XtraTabControl1.Name = "XtraTabControl1"
+ Me.XtraTabControl1.SelectedTabPage = Me.XtraTabPageControls
+ Me.XtraTabControl1.Size = New System.Drawing.Size(234, 362)
+ Me.XtraTabControl1.TabIndex = 7
+ Me.XtraTabControl1.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPageControls, Me.XtraTabPageProperties})
+ '
+ 'XtraTabPageControls
+ '
+ Me.XtraTabPageControls.Controls.Add(Me.ToolboxControlMain)
+ Me.XtraTabPageControls.Name = "XtraTabPageControls"
+ Me.XtraTabPageControls.Size = New System.Drawing.Size(232, 337)
+ Me.XtraTabPageControls.Text = "Controls"
+ '
+ 'XtraTabPageProperties
+ '
+ Me.XtraTabPageProperties.Controls.Add(Me.PropertyGridControl1)
+ Me.XtraTabPageProperties.Name = "XtraTabPageProperties"
+ Me.XtraTabPageProperties.Size = New System.Drawing.Size(232, 337)
+ Me.XtraTabPageProperties.Text = "Eigenschaften"
+ '
+ 'PropertyGridControl1
+ '
+ Me.PropertyGridControl1.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.PropertyGridControl1.Location = New System.Drawing.Point(0, 0)
+ Me.PropertyGridControl1.Name = "PropertyGridControl1"
+ Me.PropertyGridControl1.Size = New System.Drawing.Size(232, 337)
+ Me.PropertyGridControl1.TabIndex = 0
+ '
+ 'SplitContainerMain
+ '
+ Me.SplitContainerMain.CollapsePanel = DevExpress.XtraEditors.SplitCollapsePanel.Panel2
+ Me.SplitContainerMain.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.SplitContainerMain.Location = New System.Drawing.Point(0, 146)
+ Me.SplitContainerMain.Name = "SplitContainerMain"
+ Me.SplitContainerMain.Panel1.Controls.Add(Me.LayoutControlMain)
+ Me.SplitContainerMain.Panel1.Text = "Panel1"
+ Me.SplitContainerMain.Panel2.Controls.Add(Me.XtraTabControl1)
+ Me.SplitContainerMain.Panel2.Text = "Panel2"
+ Me.SplitContainerMain.Size = New System.Drawing.Size(870, 362)
+ Me.SplitContainerMain.SplitterPosition = 624
+ Me.SplitContainerMain.TabIndex = 3
+ Me.SplitContainerMain.Text = "SplitContainerControl1"
'
'frmFormDesigner
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(870, 529)
- Me.Controls.Add(Me.LayoutControlMain)
- Me.Controls.Add(Me.ToolboxControl1)
+ Me.Controls.Add(Me.SplitContainerMain)
Me.Controls.Add(Me.RibbonStatusBar)
Me.Controls.Add(Me.RibbonControl)
Me.Name = "frmFormDesigner"
Me.Ribbon = Me.RibbonControl
Me.StatusBar = Me.RibbonStatusBar
- Me.Text = "frmFormDesigner"
+ Me.Text = "Form Designer"
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlMain, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlGroupMain, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.XtraTabControl1, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.XtraTabControl1.ResumeLayout(False)
+ Me.XtraTabPageControls.ResumeLayout(False)
+ Me.XtraTabPageProperties.ResumeLayout(False)
+ CType(Me.PropertyGridControl1, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.SplitContainerMain.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -149,10 +238,16 @@ Partial Class frmFormDesigner
Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar
Friend WithEvents LayoutControlMain As DevExpress.XtraLayout.LayoutControl
Friend WithEvents LayoutControlGroupMain As DevExpress.XtraLayout.LayoutControlGroup
- Friend WithEvents ToolboxControl1 As DevExpress.XtraToolbox.ToolboxControl
+ Friend WithEvents ToolboxControlMain As DevExpress.XtraToolbox.ToolboxControl
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
- Friend WithEvents ToolboxGroup1 As DevExpress.XtraToolbox.ToolboxGroup
+ Friend WithEvents ToolboxGroupMain As DevExpress.XtraToolbox.ToolboxGroup
Friend WithEvents ToolboxItemTextbox As DevExpress.XtraToolbox.ToolboxItem
- Friend WithEvents ToolboxItemMemo As DevExpress.XtraToolbox.ToolboxItem
- Friend WithEvents ToolboxItem1 As DevExpress.XtraToolbox.ToolboxItem
+ Friend WithEvents ToolboxItemMemoedit As DevExpress.XtraToolbox.ToolboxItem
+ Friend WithEvents ToolboxItemDatepicker As DevExpress.XtraToolbox.ToolboxItem
+ Friend WithEvents XtraTabControl1 As DevExpress.XtraTab.XtraTabControl
+ Friend WithEvents XtraTabPageControls As DevExpress.XtraTab.XtraTabPage
+ Friend WithEvents XtraTabPageProperties As DevExpress.XtraTab.XtraTabPage
+ Friend WithEvents PropertyGridControl1 As DevExpress.XtraVerticalGrid.PropertyGridControl
+ Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl
+ Friend WithEvents ToolboxItemCombobox As DevExpress.XtraToolbox.ToolboxItem
End Class
diff --git a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb
index 4b287a52..d0428835 100644
--- a/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb
+++ b/EDMI_ClientSuite/FormEntityDesigner/frmFormDesigner.vb
@@ -1,21 +1,109 @@
Imports DevExpress.XtraEditors
+Imports DevExpress.XtraToolbox
Imports DevExpress.XtraLayout
+Imports DevExpress.XtraLayout.Customization
+Imports DevExpress.XtraLayout.Dragging
+Imports DevExpress.XtraLayout.HitInfo
+Imports DigitalData.Controls.LookupGrid
Public Class frmFormDesigner
- Private Const CONTROL_TEXTEDIT = "TextBox"
- Private Const CONTROL_MEMOEDIT = "Memoedit"
- Private Const CONTROL_COMBOEDIT = "Combobox"
- Private Const CONTROL_CHECKEDIT = "Checkbox"
- Private Const CONTROL_RADIOEDIT = "Radiobutton"
- Private Const CONTROL_DATEEDIT = "Datepicker"
+#Region "Drag Helper"
+ Private _DragItem As BaseLayoutItem
+ Private _Window As DragFrameWindow
+ Private _DragController As LayoutItemDragController = Nothing
+
+ Protected ReadOnly Property DragFrameWindow As DragFrameWindow
+ Get
+ If _Window Is Nothing Then
+ _Window = New DragFrameWindow(LayoutControlMain)
+ End If
+ Return _Window
+ End Get
+ End Property
+
+ Private Sub ShowDragHelper()
+ DragFrameWindow.Visible = True
+ End Sub
+
+ Private Sub HideDragHelper()
+ DragFrameWindow.Reset()
+ DragFrameWindow.Visible = False
+ End Sub
+
+ Private Sub UpdateDragHelper(p As Point)
+ p = LayoutControlMain.PointToClient(p)
+ _DragController = New LayoutItemDragController(_DragItem, LayoutControlMain.Root, New Point(p.X, p.Y))
+ DragFrameWindow.DragController = _DragController
+ End Sub
+#End Region
+#Region "Drag Drop Actions"
+ Private Sub ToolboxControlMain_DragItemDrop(sender As Object, e As ToolboxDragItemDropEventArgs) Handles ToolboxControlMain.DragItemDrop
+ Dim oPosition As Point = LayoutControlMain.PointToClient(MousePosition)
+ Dim oHitInfo As BaseLayoutItemHitInfo = LayoutControlMain.CalcHitInfo(oPosition)
+ Dim oLayoutControl As LayoutControlItem = DirectCast(_DragItem, LayoutControlItem)
+ Dim oControlName As String = oLayoutControl.Tag & ClassUtils.ShortGUID()
+ Dim oControl As Control = GetControl(oLayoutControl.Tag, oControlName)
+
+ If oLayoutControl IsNot Nothing Then
+ HideDragHelper()
+ oLayoutControl.Control = oControl
+
+ If (_DragController IsNot Nothing AndAlso _DragItem IsNot Nothing) Then
+ If (_DragItem.Owner Is Nothing OrElse _DragItem.Parent Is Nothing) Then
+ _DragController.DragWildItem()
+ Else
+ _DragController.Drag()
+ End If
+ Focus()
+ End If
+ HideDragHelper()
+ _DragItem = Nothing
+ End If
+ End Sub
+
+ Private Sub ToolboxControlMain_DragItemStart(sender As Object, e As ToolboxDragItemStartEventArgs) Handles ToolboxControlMain.DragItemStart
+ _DragItem = CreateLayoutControlItem(e.Item.Tag)
+ End Sub
+
+ Private Sub ToolboxControlMain_DragItemMove(sender As Object, e As DevExpress.XtraToolbox.ToolboxDragItemMoveEventArgs) Handles ToolboxControlMain.DragItemMove
+ If (CType(LayoutControlMain, ILayoutControl)).EnableCustomizationMode OrElse Me.DesignMode Then Return
+ Dim oFormPosition As Point = PointToClient(e.Location)
+ Dim oLayoutPosition As Point = LayoutControlMain.PointToClient(e.Location)
+
+ If LayoutControlMain.Bounds.Contains(oFormPosition) Then
+
+ If Not DragFrameWindow.Visible Then
+ DragFrameWindow.Visible = True
+ Return
+ End If
+
+ UpdateDragHelper(e.Location)
+ Else
+ DragFrameWindow.Visible = False
+ End If
+ End Sub
+#End Region
+
+ Private _FormId As Int64
+
+ Public Sub New()
+ ' Dieser Aufruf ist für den Designer erforderlich.
+ InitializeComponent()
+ ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
+ _FormId = 104
+ End Sub
+
+ Public Sub New(FormId As Int64)
+ ' Dieser Aufruf ist für den Designer erforderlich.
+ InitializeComponent()
+ ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
+ _FormId = FormId
+ End Sub
Private Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles MyBase.Load
-
- Dim oFormId As Int64 = 104
-
My.Channel.CreateDatabaseRequest("Load Controls", True)
- Dim oSQL As String = $"SELECT * FROM VWICM_FORMCONTROL WHERE FORMID = {oFormId}"
+ Dim oSQL As String = $"SELECT * FROM VWICM_FORMCONTROL WHERE FORMID = {_FormId}"
Dim oResult = My.Channel.ReturnDatatable(oSQL)
Dim oTable = oResult.Table
@@ -28,33 +116,42 @@ Public Class frmFormDesigner
LoadControls(oTable)
End Sub
+ Private Function GetControl(Type As String, Name As String)
+ Dim oEditor As BaseEdit = Nothing
+
+ Select Case Type
+ Case ClassConstants.CONTROL_TEXTEDIT
+ Dim oTextEdit As New TextEdit() With {.Name = Name}
+ oEditor = oTextEdit
+ Case ClassConstants.CONTROL_MEMOEDIT
+ Dim oMemoEdit As New MemoEdit() With {.Name = Name}
+ oEditor = oMemoEdit
+ Case ClassConstants.CONTROL_DATEEDIT
+ Dim oDateEdit As New DateEdit() With {.Name = Name}
+ oEditor = oDateEdit
+ Case ClassConstants.CONTROL_CHECKEDIT
+ Dim oCheckEdit As New CheckEdit() With {.Name = Name}
+ oEditor = oCheckEdit
+ Case ClassConstants.CONTROL_COMBOEDIT
+ Dim oComboEdit As New LookupControl2() With {.Name = Name}
+ oEditor = oComboEdit
+ Case Else
+ oEditor = Nothing
+ End Select
+
+ Return oEditor
+ End Function
+
+ Private Function CreateLayoutControlItem(Id As String) As LayoutControlItem
+ Return New LayoutControlItem() With {.Tag = Id}
+ End Function
+
Private Sub LoadControls(Datatable As DataTable)
For Each oRow As DataRow In Datatable.Rows
-
- Dim oEditor As BaseEdit = Nothing
Dim oCaption As String = oRow.Item("COLNAME")
Dim oControlType As String = oRow.Item("CTRLTYPE")
Dim oControlId As String = oRow.Item("RECORD_ID").ToString
-
- Select Case oControlType
- Case CONTROL_TEXTEDIT
- Dim oTextEdit As New TextEdit() With {.Name = oControlId}
- oEditor = oTextEdit
- Case CONTROL_MEMOEDIT
- Dim oMemoEdit As New MemoEdit() With {.Name = oControlId}
- oEditor = oMemoEdit
- Case CONTROL_DATEEDIT
- Dim oDateEdit As New DateEdit() With {.Name = oControlId}
- oEditor = oDateEdit
- Case CONTROL_CHECKEDIT
- Dim oCheckEdit As New CheckEdit() With {.Name = oControlId}
- oEditor = oCheckEdit
- Case CONTROL_COMBOEDIT
- Dim oComboEdit As New ComboBoxEdit() With {.Name = oControlId}
- oEditor = oComboEdit
- Case Else
-
- End Select
+ Dim oEditor As BaseEdit = GetControl(oControlType, oControlId)
If oEditor Is Nothing Then
Continue For
@@ -65,4 +162,8 @@ Public Class frmFormDesigner
LayoutControlGroupMain.AddItem(New EmptySpaceItem())
End Sub
+
+ Private Sub LayoutControlMain_ItemSelectionChanged(sender As Object, e As EventArgs) Handles LayoutControlMain.ItemSelectionChanged
+ ' TODO: Load Property Grid for selected item
+ End Sub
End Class
\ No newline at end of file
diff --git a/EDMI_ClientSuite/My Project/Resources.Designer.vb b/EDMI_ClientSuite/My Project/Resources.Designer.vb
index 12f93519..6b5f1bee 100644
--- a/EDMI_ClientSuite/My Project/Resources.Designer.vb
+++ b/EDMI_ClientSuite/My Project/Resources.Designer.vb
@@ -60,6 +60,26 @@ Namespace My.Resources
End Set
End Property
+ '''
+ ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
+ '''
+ Friend ReadOnly Property ComboBox() As System.Drawing.Bitmap
+ Get
+ Dim obj As Object = ResourceManager.GetObject("ComboBox", resourceCulture)
+ Return CType(obj,System.Drawing.Bitmap)
+ End Get
+ End Property
+
+ '''
+ ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
+ '''
+ Friend ReadOnly Property DatePicker() As System.Drawing.Bitmap
+ Get
+ Dim obj As Object = ResourceManager.GetObject("DatePicker", resourceCulture)
+ Return CType(obj,System.Drawing.Bitmap)
+ End Get
+ End Property
+
'''
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''
@@ -70,6 +90,16 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
+ '''
+ Friend ReadOnly Property TextBox() As System.Drawing.Bitmap
+ Get
+ Dim obj As Object = ResourceManager.GetObject("TextBox", resourceCulture)
+ Return CType(obj,System.Drawing.Bitmap)
+ End Get
+ End Property
+
'''
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''
diff --git a/EDMI_ClientSuite/My Project/Resources.resx b/EDMI_ClientSuite/My Project/Resources.resx
index f9ad61a5..b7e38bfa 100644
--- a/EDMI_ClientSuite/My Project/Resources.resx
+++ b/EDMI_ClientSuite/My Project/Resources.resx
@@ -118,10 +118,19 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ ..\Resources\TextBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\iconfinder_Gowalla_324477.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\DatePicker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\user_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\ComboBox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/EDMI_ClientSuite/Resources/ComboBox.png b/EDMI_ClientSuite/Resources/ComboBox.png
new file mode 100644
index 00000000..91985513
Binary files /dev/null and b/EDMI_ClientSuite/Resources/ComboBox.png differ
diff --git a/EDMI_ClientSuite/Resources/DatePicker.png b/EDMI_ClientSuite/Resources/DatePicker.png
new file mode 100644
index 00000000..273433cc
Binary files /dev/null and b/EDMI_ClientSuite/Resources/DatePicker.png differ
diff --git a/EDMI_ClientSuite/Resources/TextBox.png b/EDMI_ClientSuite/Resources/TextBox.png
new file mode 100644
index 00000000..e38d5a05
Binary files /dev/null and b/EDMI_ClientSuite/Resources/TextBox.png differ