controls placeholders, sort and filter

This commit is contained in:
Jonathan Jenne
2022-08-15 16:31:54 +02:00
parent 403d23db93
commit e7e3bb5c38
2 changed files with 59 additions and 452 deletions

View File

@@ -15,7 +15,7 @@ Public Class frmFormDesigner
Public ProfileName As String
Public ProfileObjectType As String
Public Designer_Locked As Boolean = True
Public ControlSelected As String
Public ControlSelected As String = ""
' Control Variables
Private CurrentControl As Control = Nothing
@@ -35,6 +35,14 @@ Public Class frmFormDesigner
Private CurrentColumnId As Integer = 0
Public Sub Reload_ControlNameList()
TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil(DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS, USER_LANGUAGE, CURRENT_ProfilGUID)
CURRENT_CONTROL_NAME_LIST = DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS.AsEnumerable().
Where(Function(row) row.CTRL_TYPE <> "LBL").
Select(Function(row) row.NAME).
OrderBy(Function(name) name).
ToList()
End Sub
Private Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
@@ -1303,9 +1311,12 @@ Public Class frmFormDesigner
Dim oSQL = $"SELECT SQL_BTN_FINISH FROM TBPM_PROFILE WHERE GUID = {ProfileId}"
Dim oldSQL = DatabaseFallback.GetScalarValueECM(oSQL)
Dim oForm As New frmSQLEditor(LOGCONFIG, DatabaseECM) With {
.SQLCommand = oldSQL,
.SQLConnection = 1
}
.SQLCommand = oldSQL,
.SQLConnection = 1,
.PlaceholdersManualPrefix = "CTRL",
.PlaceholdersManualTitle = "Controls",
.PlaceholdersManual = CURRENT_CONTROL_NAME_LIST.ToDictionary(Function(name) name, Function(name) name)
}
oForm.ShowDialog()
If oForm.DialogResult = DialogResult.OK Then
@@ -1368,6 +1379,7 @@ Public Class frmFormDesigner
If Designer_Locked Then
Exit Sub
End If
Me.Cursor = Cursors.Cross
Mouse_IsPressed = True
CurrentControl = Nothing
@@ -1412,7 +1424,8 @@ Public Class frmFormDesigner
If Designer_Locked Then
Exit Sub
End If
If Me.Cursor = Cursors.Cross And Mouse_IsPressed = True Then
If Cursor = Cursors.Cross And Mouse_IsPressed = True Then
Dim cursorPosition As Point = pnldesigner.PointToClient(Cursor.Position)
Mouse_IsPressed = False
@@ -1552,9 +1565,13 @@ Public Class frmFormDesigner
.ReadOnly = False
}
pnldesigner.Controls.Add(oButton)
End Select
If IsNothing(ControlSelected) = False Then
Reload_ControlNameList()
End If
If Not IsNothing(CurrentControl) Then
RibPGCtrlheight.Enabled = True
RibPGCtrlWidth.Enabled = True
@@ -1565,6 +1582,7 @@ Public Class frmFormDesigner
LOGGER.Info(ex)
End Try
Me.Cursor = Cursors.Default
ControlSelected = ""
End If
End Sub