This commit is contained in:
Jonathan Jenne 2019-12-04 14:50:31 +01:00
parent 07b913be52
commit 65fa9c898f
8 changed files with 93 additions and 28 deletions

View File

@ -13,4 +13,12 @@ Public Class ImageValue
Public Sub New(value As String) Public Sub New(value As String)
Me.Value = value Me.Value = value
End Sub End Sub
Public Overrides Function ToString() As String
If Value = String.Empty Then
Return String.Empty
Else
Return "(Image)"
End If
End Function
End Class End Class

View File

@ -0,0 +1,56 @@
Public Class ClassSnapPanel
Inherits System.Windows.Forms.Panel
Private _ShowGrid As Boolean = True
Private _GridSize As Integer = 16
Private Property AutoScaleMode As AutoScaleMode
Public Property GridSize As Integer
Get
Return _GridSize
End Get
Set(value As Integer)
_GridSize = value
Refresh()
End Set
End Property
Public Property ShowGrid As Boolean
Get
Return _ShowGrid
End Get
Set(value As Boolean)
_ShowGrid = value
Refresh()
End Set
End Property
Protected Overrides Sub OnControlAdded(e As System.Windows.Forms.ControlEventArgs)
AddHandler e.Control.LocationChanged, AddressOf AlignToGrid
AddHandler e.Control.DragDrop, AddressOf AlignToGrid
MyBase.OnControlAdded(e)
End Sub
Protected Overrides Sub OnControlRemoved(e As System.Windows.Forms.ControlEventArgs)
RemoveHandler e.Control.LocationChanged, AddressOf AlignToGrid
RemoveHandler e.Control.DragDrop, AddressOf AlignToGrid
MyBase.OnControlRemoved(e)
End Sub
Protected Overrides Sub OnPaint(e As System.Windows.Forms.PaintEventArgs)
If _ShowGrid Then
ControlPaint.DrawGrid(e.Graphics, ClientRectangle, New Size(_GridSize, _GridSize), BackColor)
End If
MyBase.OnPaint(e)
End Sub
Private Sub AlignToGrid(sender As Object, e As EventArgs)
If _ShowGrid Then
Dim item As Control = CType(sender, Control)
Dim x As Integer = Math.Round(item.Left / _GridSize) * _GridSize
Dim y As Integer = Math.Round(item.Top / _GridSize) * _GridSize
item.Location = New Point(x, y)
End If
End Sub
End Class

View File

@ -212,6 +212,9 @@
<Compile Include="ClassParamRefresh.vb" /> <Compile Include="ClassParamRefresh.vb" />
<Compile Include="ClassRefreshHelper.vb" /> <Compile Include="ClassRefreshHelper.vb" />
<Compile Include="ClassRegexEditor.vb" /> <Compile Include="ClassRegexEditor.vb" />
<Compile Include="ClassSnapPanel.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="ClassSQLEditor.vb" /> <Compile Include="ClassSQLEditor.vb" />
<Compile Include="ClassSQLTypeConverter.vb" /> <Compile Include="ClassSQLTypeConverter.vb" />
<Compile Include="ClassSQLValue.vb" /> <Compile Include="ClassSQLValue.vb" />

View File

@ -80,7 +80,7 @@ Public Module ModuleControlProperties
Private _sql_command As String Private _sql_command As String
Private _Override_SQL As String Private _Override_SQL As String
Private _Enable_SQL As String Private _Enable_SQL As String
Private _image_Value As String
Private _default_value Private _default_value
Public Property Required() As Boolean Public Property Required() As Boolean
<Category("Validierung")> <Category("Validierung")>
@ -124,15 +124,7 @@ Public Module ModuleControlProperties
_Enable_SQL = value.Value _Enable_SQL = value.Value
End Set End Set
End Property End Property
<Category("Image")>
Public Property CtrlImage() As ImageValue
Get
Return New ImageValue(NotNull(_image_Value, ""))
End Get
Set(ByVal value As ImageValue)
_image_Value = value.Value
End Set
End Property
<Category("Daten")> <Category("Daten")>
Public Property DefaultValue() As String Public Property DefaultValue() As String
Get Get
@ -224,8 +216,22 @@ Public Module ModuleControlProperties
End Class End Class
Public Class ButtonProperties Public Class ButtonProperties
Inherits InputProperties Inherits InputProperties
Private _image_Value As String
<Category("Allgemein")> <Category("Allgemein")>
Public Property Text() As String Public Property Text() As String
<Category("Image")>
Public Property CtrlImage() As ImageValue
Get
Return New ImageValue(NotNull(_image_Value, ""))
End Get
Set(ByVal value As ImageValue)
_image_Value = value.Value
End Set
End Property
End Class End Class
Public Class LookupControlProperties Public Class LookupControlProperties
Inherits InputProperties Inherits InputProperties

View File

@ -33,7 +33,7 @@ Partial Class frmFormDesigner
Me.btndtp = New System.Windows.Forms.Button() Me.btndtp = New System.Windows.Forms.Button()
Me.btntextbox = New System.Windows.Forms.Button() Me.btntextbox = New System.Windows.Forms.Button()
Me.btnlabel = New System.Windows.Forms.Button() Me.btnlabel = New System.Windows.Forms.Button()
Me.pnldesigner = New System.Windows.Forms.Panel() Me.pnldesigner = New DD_PM_WINDREAM.ClassSnapPanel()
Me.Label1 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label()
Me.lblhintergrund = New System.Windows.Forms.Label() Me.lblhintergrund = New System.Windows.Forms.Label()
Me.TabControlEigenschaften = New System.Windows.Forms.TabControl() Me.TabControlEigenschaften = New System.Windows.Forms.TabControl()
@ -215,8 +215,10 @@ Partial Class frmFormDesigner
Me.pnldesigner.Controls.Add(Me.Label1) Me.pnldesigner.Controls.Add(Me.Label1)
Me.pnldesigner.Controls.Add(Me.lblhintergrund) Me.pnldesigner.Controls.Add(Me.lblhintergrund)
Me.pnldesigner.Dock = System.Windows.Forms.DockStyle.Fill Me.pnldesigner.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnldesigner.GridSize = 20
Me.pnldesigner.Location = New System.Drawing.Point(0, 0) Me.pnldesigner.Location = New System.Drawing.Point(0, 0)
Me.pnldesigner.Name = "pnldesigner" Me.pnldesigner.Name = "pnldesigner"
Me.pnldesigner.ShowGrid = True
Me.pnldesigner.Size = New System.Drawing.Size(842, 650) Me.pnldesigner.Size = New System.Drawing.Size(842, 650)
Me.pnldesigner.TabIndex = 3 Me.pnldesigner.TabIndex = 3
' '
@ -287,7 +289,7 @@ Partial Class frmFormDesigner
Me.pageFormat.Location = New System.Drawing.Point(4, 22) Me.pageFormat.Location = New System.Drawing.Point(4, 22)
Me.pageFormat.Name = "pageFormat" Me.pageFormat.Name = "pageFormat"
Me.pageFormat.Padding = New System.Windows.Forms.Padding(3) Me.pageFormat.Padding = New System.Windows.Forms.Padding(3)
Me.pageFormat.Size = New System.Drawing.Size(532, 523) Me.pageFormat.Size = New System.Drawing.Size(363, 439)
Me.pageFormat.TabIndex = 1 Me.pageFormat.TabIndex = 1
Me.pageFormat.Text = "Format" Me.pageFormat.Text = "Format"
Me.pageFormat.UseVisualStyleBackColor = True Me.pageFormat.UseVisualStyleBackColor = True
@ -428,6 +430,7 @@ Partial Class frmFormDesigner
Me.TableAdapterManager.BackupDataSetBeforeUpdate = False Me.TableAdapterManager.BackupDataSetBeforeUpdate = False
Me.TableAdapterManager.TBDD_CONNECTIONTableAdapter = Nothing Me.TableAdapterManager.TBDD_CONNECTIONTableAdapter = Nothing
Me.TableAdapterManager.TBDD_EMAIL_TEMPLATETableAdapter = Nothing Me.TableAdapterManager.TBDD_EMAIL_TEMPLATETableAdapter = Nothing
Me.TableAdapterManager.TBDD_GUI_LANGUAGE_PHRASETableAdapter = Nothing
Me.TableAdapterManager.TBDD_USERTableAdapter = Nothing Me.TableAdapterManager.TBDD_USERTableAdapter = Nothing
Me.TableAdapterManager.TBPM_CONTROL_TABLETableAdapter = Nothing Me.TableAdapterManager.TBPM_CONTROL_TABLETableAdapter = Nothing
Me.TableAdapterManager.TBPM_ERROR_LOGTableAdapter = Nothing Me.TableAdapterManager.TBPM_ERROR_LOGTableAdapter = Nothing
@ -536,7 +539,7 @@ Partial Class frmFormDesigner
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents btnlabel As System.Windows.Forms.Button Friend WithEvents btnlabel As System.Windows.Forms.Button
Friend WithEvents btntextbox As System.Windows.Forms.Button Friend WithEvents btntextbox As System.Windows.Forms.Button
Friend WithEvents pnldesigner As System.Windows.Forms.Panel Friend WithEvents pnldesigner As DD_PM_WINDREAM.ClassSnapPanel
Friend WithEvents btndtp As System.Windows.Forms.Button Friend WithEvents btndtp As System.Windows.Forms.Button
Friend WithEvents lblhintergrund As System.Windows.Forms.Label Friend WithEvents lblhintergrund As System.Windows.Forms.Label
Friend WithEvents btndelete As System.Windows.Forms.Button Friend WithEvents btndelete As System.Windows.Forms.Button

View File

@ -522,6 +522,8 @@ Public Class frmFormDesigner
oControl.BackColor = oControl.ForeColor oControl.BackColor = oControl.ForeColor
Case "DigitalData.Controls.LookupGrid.LookupControl2" Case "DigitalData.Controls.LookupGrid.LookupControl2"
oControl.BackColor = Color.White oControl.BackColor = Color.White
Case "System.Windows.Forms.Button"
oControl.BackColor = SystemColors.Control
End Select End Select
End If End If
End If End If
@ -921,7 +923,7 @@ Public Class frmFormDesigner
If Not IsDBNull(row.Item("IMAGE_CONTROL")) Then If Not IsDBNull(row.Item("IMAGE_CONTROL")) Then
Dim obimg() As Byte = row.Item("IMAGE_CONTROL") Dim obimg() As Byte = row.Item("IMAGE_CONTROL")
Dim oBitmap As Bitmap = ByteArrayToBitmap(obimg) Dim oBitmap As Bitmap = ByteArrayToBitmap(obimg)
oButtonProps.CtrlImage = New ImageValue(Nothing) oButtonProps.CtrlImage = New ImageValue("IMAGE")
oButton.Image = oBitmap oButton.Image = oBitmap
End If End If

View File

@ -226,22 +226,10 @@ Public Class frmSQL_DESIGNER
Private Sub btnSaveSQLCommand_Click(sender As Object, e As EventArgs) Handles btnSaveSQLCommand.Click Private Sub btnSaveSQLCommand_Click(sender As Object, e As EventArgs) Handles btnSaveSQLCommand.Click
If CURRENT_DESIGN_TYPE = "FINAL_INDEX" Then If CURRENT_DESIGN_TYPE = "FINAL_INDEX" Then
' SQL wird nicht hier, sondern in frmAdministration gespeichert ' SQL wird nicht hier, sondern in frmAdministration gespeichert
'TBPM_PROFILE_FINAL_INDEXINGTableAdapter.cmdUpdateSQL(cmbConnection.SelectedValue, SQL_COMMANDTextBox.Text, Environment.UserName, CURRENT_INDEX_ID)
lblSaveFinalIndex.Visible = True lblSaveFinalIndex.Visible = True
lblSaveFinalIndex.Text = "SQL für finalen Index wurde erfolgreich gespeichert! " & Now.ToString lblSaveFinalIndex.Text = "SQL für finalen Index wurde erfolgreich gespeichert! " & Now.ToString
Me.ConnectionId = cmbConnection.SelectedValue
ElseIf CURRENT_DESIGN_TYPE = "INPUT_INDEX" Then
Dim command = SQL_COMMANDTextBox.Text
command = command.Replace("'", "''")
Dim upd As String = String.Format("UPDATE TBPM_PROFILE_CONTROLS SET CONNECTION_ID = {0} , SQL_UEBERPRUEFUNG = '{1}' WHERE GUID = {2}", cmbConnection.SelectedValue, command, CURRENT_CONTROL_ID)
If ClassDatabase.Execute_non_Query(upd, True) Then
lblSaveFinalIndex.Visible = True
lblSaveFinalIndex.Text = "SQL für Indexdisplay wurde erfolgreich gespeichert! " & Now.ToString
Else
lblSaveFinalIndex.Visible = False
End If
End If End If
Me.SQLCommand = SQL_COMMANDTextBox.Text SQLCommand = SQL_COMMANDTextBox.Text
End Sub End Sub
Private Sub btnAddControl_Click(sender As Object, e As EventArgs) Handles btnAddControl.Click Private Sub btnAddControl_Click(sender As Object, e As EventArgs) Handles btnAddControl.Click

View File

@ -2799,7 +2799,6 @@ Public Class frmValidator
If oValue.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ### If oValue.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
LOGGER.Debug("Indexing wih dynamic sql...") LOGGER.Debug("Indexing wih dynamic sql...")
Dim oSQLCommand = oFinalIndexRow.Item("SQL_COMMAND") Dim oSQLCommand = oFinalIndexRow.Item("SQL_COMMAND")
s
oSQLCommand = clsPatterns.ReplaceAllValues(oSQLCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID) oSQLCommand = clsPatterns.ReplaceAllValues(oSQLCommand, pnldesigner, CURRENT_WMFILE, USER_PRENAME, USER_SURNAME, USER_SHORTNAME, USER_LANGUAGE, USER_EMAIL, USER_ID, CURRENT_CLICKED_PROFILE_ID)
If IsNothing(oSQLCommand) Then If IsNothing(oSQLCommand) Then
errormessage = "Error while replacing Values in final indexing - Check the log" errormessage = "Error while replacing Values in final indexing - Check the log"