jj: add line control
This commit is contained in:
parent
7061728251
commit
fd2dc4bf99
@ -180,7 +180,7 @@ Public Class ClassControlBuilder
|
|||||||
control.BackColor = Color.White
|
control.BackColor = Color.White
|
||||||
control.ForeColor = Color.Black
|
control.ForeColor = Color.Black
|
||||||
ElseIf control.ReadOnly = True Then
|
ElseIf control.ReadOnly = True Then
|
||||||
control.BackColor = System.Drawing.SystemColors.Info
|
control.BackColor = SystemColors.Info
|
||||||
control.ForeColor = Color.Black 'System.Drawing.SystemColors.InfoText
|
control.ForeColor = Color.Black 'System.Drawing.SystemColors.InfoText
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@ -1480,8 +1480,8 @@ Public Class ClassControlBuilder
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Me.SetEventHandlers(control)
|
SetEventHandlers(control)
|
||||||
Me.CurrentControl = DirectCast(control, Label)
|
CurrentControl = control
|
||||||
|
|
||||||
If Not IsNothing(parent) Then
|
If Not IsNothing(parent) Then
|
||||||
control.Parent = parent
|
control.Parent = parent
|
||||||
@ -1497,6 +1497,37 @@ Public Class ClassControlBuilder
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AddLine(id As Integer,
|
||||||
|
name As String,
|
||||||
|
x As Integer,
|
||||||
|
y As Integer,
|
||||||
|
color As Integer,
|
||||||
|
width As Integer,
|
||||||
|
height As Integer,
|
||||||
|
_new As Integer,
|
||||||
|
Optional parent As GroupBox = Nothing,
|
||||||
|
Optional _designMode As Boolean = False)
|
||||||
|
Dim line As New LineLabel
|
||||||
|
line.Tag = New ClassControlMetadata() With {
|
||||||
|
.Id = id,
|
||||||
|
.Name = name
|
||||||
|
}
|
||||||
|
line.Name = name
|
||||||
|
|
||||||
|
If _new Then
|
||||||
|
line.Location = GetCursorPosition()
|
||||||
|
line.Size = New Size(200, 5)
|
||||||
|
Else
|
||||||
|
line.Location = New Point(x, y)
|
||||||
|
line.Size = New Size(width, height)
|
||||||
|
End If
|
||||||
|
|
||||||
|
CurrentControl = line
|
||||||
|
|
||||||
|
line.Parent = _master_panel
|
||||||
|
AddToPanel(line)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub AddTextBox(id As Integer,
|
Public Sub AddTextBox(id As Integer,
|
||||||
name As String,
|
name As String,
|
||||||
x As Integer,
|
x As Integer,
|
||||||
@ -2583,4 +2614,8 @@ Public Class ClassControlBuilder
|
|||||||
MsgBox("Error in AddListBox: " + vbNewLine + ex.Message)
|
MsgBox("Error in AddListBox: " + vbNewLine + ex.Message)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Class LineLabel
|
||||||
|
Inherits Label
|
||||||
|
End Class
|
||||||
End Class
|
End Class
|
||||||
@ -42,6 +42,8 @@
|
|||||||
Return 12
|
Return 12
|
||||||
Case CurrentType.Contains("ListBoxControl".ToUpper)
|
Case CurrentType.Contains("ListBoxControl".ToUpper)
|
||||||
Return 13
|
Return 13
|
||||||
|
Case CurrentType.Contains("LineLabel")
|
||||||
|
Return 14
|
||||||
Case Else
|
Case Else
|
||||||
Return -1
|
Return -1
|
||||||
End Select
|
End Select
|
||||||
@ -100,7 +102,14 @@
|
|||||||
|
|
||||||
' SQL Befehl für CONTROL TABELLE
|
' SQL Befehl für CONTROL TABELLE
|
||||||
' SQL_COMMAND_1 auf leeren String setzen
|
' SQL_COMMAND_1 auf leeren String setzen
|
||||||
SQL = "INSERT INTO TBPMO_CONTROL (FORM_ID, CONTROL_TYPE_ID, DEFAULT_VALUE, NAME, COL_NAME, PARENT_CONTROL_ID, SQL_COMMAND_1) VALUES (" & CURRENT_ENTITY_ID & ", " & CONTROL_TYPE_ID & ", '', '" & NAME & "', '" & NAME & "', " & PARENT_CONTROL_ID & ", '')"
|
|
||||||
|
SQL = $"""
|
||||||
|
INSERT INTO TBPMO_CONTROL
|
||||||
|
(FORM_ID, CONTROL_TYPE_ID, DEFAULT_VALUE, NAME, COL_NAME, PARENT_CONTROL_ID, SQL_COMMAND_1)
|
||||||
|
VALUES
|
||||||
|
({CURRENT_ENTITY_ID}, {CONTROL_TYPE_ID}, '', '{NAME}', '{NAME}', {PARENT_CONTROL_ID}, '')
|
||||||
|
"""
|
||||||
|
|
||||||
'If LogErrorsOnly = False Then ClassLogger.Add(SQL, True)
|
'If LogErrorsOnly = False Then ClassLogger.Add(SQL, True)
|
||||||
If ClassDatabase.Execute_non_Query(SQL) = True Then
|
If ClassDatabase.Execute_non_Query(SQL) = True Then
|
||||||
SQL = "SELECT MAX(GUID) FROM TBPMO_CONTROL"
|
SQL = "SELECT MAX(GUID) FROM TBPMO_CONTROL"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user