This commit is contained in:
Jonathan Jenne
2018-12-19 17:10:24 +01:00
parent deceba1cad
commit ecad723121
6 changed files with 112 additions and 53 deletions

View File

@@ -1,4 +1,5 @@
Imports DD_LIB_Standards
Imports DigitalData.Controls.LookupGrid
Public Class ClassControlCreator
@@ -78,7 +79,7 @@ Public Class ClassControlCreator
Public Shared Function CreateNewTextBox(location As Point) As TextBox
Dim control As New TextBox With {
.Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGUID()}",
.Name = $"{PREFIX_TEXTBOX}_{clsTools.ShortGuid()}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Location = location,
.ReadOnly = True,
@@ -91,7 +92,7 @@ Public Class ClassControlCreator
Public Shared Function CreateNewLabel(location As Point) As Label
Dim control As New Label With {
.Name = $"{PREFIX_LABEL}_{clsTools.ShortGUID}",
.Name = $"{PREFIX_LABEL}_{clsTools.ShortGuid}",
.Text = DEFAULT_TEXT,
.AutoSize = True,
.Location = location,
@@ -103,7 +104,7 @@ Public Class ClassControlCreator
Public Shared Function CreateNewCheckbox(location As Point) As CheckBox
Dim control As New CheckBox With {
.Name = $"{PREFIX_CHECKBOX}_{clsTools.ShortGUID}",
.Name = $"{PREFIX_CHECKBOX}_{clsTools.ShortGuid}",
.AutoSize = True,
.Text = DEFAULT_TEXT,
.Cursor = Cursors.Hand,
@@ -115,7 +116,7 @@ Public Class ClassControlCreator
Public Shared Function CreateNewCombobox(location As Point) As ComboBox
Dim control As New ComboBox With {
.Name = $"{PREFIX_COMBOBOX}_{clsTools.ShortGUID}",
.Name = $"{PREFIX_COMBOBOX}_{clsTools.ShortGuid}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Cursor = Cursors.Hand,
.Location = location
@@ -126,7 +127,7 @@ Public Class ClassControlCreator
Public Shared Function CreateNewDatetimepicker(location As Point) As DateTimePicker
Dim control As New DateTimePicker With {
.Name = $"{PREFIX_DATETIMEPICKER}_{clsTools.ShortGUID}",
.Name = $"{PREFIX_DATETIMEPICKER}_{clsTools.ShortGuid}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Cursor = Cursors.Hand,
.Location = location,
@@ -138,7 +139,7 @@ Public Class ClassControlCreator
Public Shared Function CreateNewDatagridview(location As Point) As DataGridView
Dim control As New DataGridView With {
.Name = $"{PREFIX_DATAGRIDVIEW}_{clsTools.ShortGUID}",
.Name = $"{PREFIX_DATAGRIDVIEW}_{clsTools.ShortGuid}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT_TABLE),
.Cursor = Cursors.Hand,
.Location = location,
@@ -156,9 +157,21 @@ Public Class ClassControlCreator
Return control
End Function
Friend Shared Function CreateNewLookupControl(location As Point) As LookupControl
Dim control As New LookupControl With {
.Name = $"{PREFIX_DATAGRIDVIEW}_{clsTools.ShortGuid}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT),
.Cursor = Cursors.Hand,
.Location = location
}
Return control
End Function
Public Shared Function CreateNewTable(location As Point) As DataGridView
Dim control As New DataGridView With {
.Name = $"{PREFIX_TABLE}_{clsTools.ShortGUID}",
.Name = $"{PREFIX_TABLE}_{clsTools.ShortGuid}",
.Size = New Size(DEFAULT_WIDTH, DEFAULT_HEIGHT_TABLE),
.Cursor = Cursors.Hand,
.Location = location,
@@ -183,7 +196,7 @@ Public Class ClassControlCreator
Public Shared Function CreateNewLine(location As Point) As LineLabel
Dim control As New LineLabel With {
.Name = $"{PREFIX_LINE}_{clsTools.ShortGUID}",
.Name = $"{PREFIX_LINE}_{clsTools.ShortGuid}",
.Text = "---------------------------------",
.Size = New Size(100, 5),
.Location = location
@@ -296,6 +309,16 @@ Public Class ClassControlCreator
Return control
End Function
Public Shared Function CreateExistingLookupControl(row As DataRow, designMode As Boolean)
Dim control As LookupControl = CreateBaseControl(New LookupControl(), row, designMode)
If designMode Then
control.Cursor = Cursors.Hand
End If
Return control
End Function
Public Shared Function CreateExistingTable(row As DataRow, columns As List(Of DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow), designMode As Boolean) As DataGridView
Dim control As DataGridView = CreateBaseControl(New DataGridView(), row, designMode)
@@ -402,6 +425,7 @@ Public Class ClassControlCreator
Return 0
End Try
End Function
Public Shared Function GET_CONNECTION_INFO(CON_ID As Integer)
Try