fix loading control name list
This commit is contained in:
@@ -19,6 +19,7 @@ Public Class frmFormDesigner
|
||||
|
||||
' Control Variables
|
||||
Private CurrentControl As Control = Nothing
|
||||
Private _Logger = LOGCONFIG.GetLogger()
|
||||
|
||||
' Movement Variables
|
||||
Private Mouse_IsPressed As Boolean
|
||||
@@ -36,16 +37,24 @@ 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).
|
||||
_Logger.debug("Reloading control name list")
|
||||
Dim oControlNameList = DatabaseFallback.GetDatatableECM($"
|
||||
SELECT NAME
|
||||
FROM TBPM_PROFILE_CONTROLS
|
||||
WHERE
|
||||
PROFIL_ID = {CURRENT_ProfilGUID} AND
|
||||
CTRL_TYPE <> 'LBL'
|
||||
ORDER BY NAME"
|
||||
)
|
||||
CURRENT_CONTROL_NAME_LIST = oControlNameList.AsEnumerable().
|
||||
Select(Function(row) row.ItemEx("NAME", String.Empty)).
|
||||
ToList()
|
||||
_Logger.debug("Reloading control name list done!")
|
||||
End Sub
|
||||
|
||||
Private Sub frmFormDesigner_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Try
|
||||
|
||||
ClassControlCreator.Logger = LOGCONFIG.GetLoggerFor("ControlCreator")
|
||||
BarButtonItem3.Caption = "Designer locked"
|
||||
BarButtonItem3.ItemAppearance.Normal.BackColor = Color.Red
|
||||
@@ -104,7 +113,7 @@ Public Class frmFormDesigner
|
||||
End If
|
||||
|
||||
'Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
' _Logger.Error(ex)
|
||||
' MsgBox("Fehler bei Initialisieren von windream: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
|
||||
'End Try
|
||||
|
||||
@@ -115,13 +124,13 @@ Public Class frmFormDesigner
|
||||
TBPM_CONTROL_TABLETableAdapter.Connection.ConnectionString = CONNECTION_STRING_ECM
|
||||
TBDD_CONNECTIONTableAdapter.Fill(DD_DMSLiteDataSet.TBDD_CONNECTION)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
MsgBox("Fehler bei Laden der Connection-Strings und Grunddaten: " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
|
||||
End Try
|
||||
|
||||
LoadControls()
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "error loading form:")
|
||||
End Try
|
||||
End Sub
|
||||
@@ -305,7 +314,7 @@ Public Class frmFormDesigner
|
||||
End Select
|
||||
Next
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
MsgBox("Fehler bei LoadControls " & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Achtung:")
|
||||
End Try
|
||||
|
||||
@@ -320,7 +329,7 @@ Public Class frmFormDesigner
|
||||
' Try
|
||||
' TBPM_PROFILE_CONTROLSBindingSource.Clear()
|
||||
' Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
' _Logger.Error(ex)
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
@@ -509,9 +518,9 @@ Public Class frmFormDesigner
|
||||
' pnldesigner.Controls.Add(oButton)
|
||||
' End Select
|
||||
' Catch ex As Exception
|
||||
' LOGGER.Error(ex)
|
||||
' LOGGER.Info($"Error while Adding new control {e.Data.GetData(DataFormats.Text)}:")
|
||||
' LOGGER.Info(ex)
|
||||
' _Logger.Error(ex)
|
||||
' _Logger.Info($"Error while Adding new control {e.Data.GetData(DataFormats.Text)}:")
|
||||
' _Logger.Info(ex)
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
@@ -599,7 +608,7 @@ Public Class frmFormDesigner
|
||||
GridControlContextMenu.Show(Cursor.Position.X, Cursor.Position.Y)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
MsgBox("Error while loading Column Configuration: " & vbCrLf & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
@@ -618,7 +627,7 @@ Public Class frmFormDesigner
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "DeleteControl:")
|
||||
End Try
|
||||
End Sub
|
||||
@@ -718,7 +727,7 @@ Public Class frmFormDesigner
|
||||
MyBase.Cursor = Cursors.Default
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
Mouse_IsMoving = False
|
||||
Mouse_IsPressed = False
|
||||
End Try
|
||||
@@ -747,7 +756,7 @@ Public Class frmFormDesigner
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
Mouse_IsMoving = False
|
||||
End Try
|
||||
End Sub
|
||||
@@ -822,9 +831,9 @@ Public Class frmFormDesigner
|
||||
Try
|
||||
TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil(DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS, USER_LANGUAGE, ProfileId)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Error while executing TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil in LoadControlProperties:")
|
||||
LOGGER.Info(ex)
|
||||
_LOGGER.Error(ex)
|
||||
_LOGGER.Info("Error while executing TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil in LoadControlProperties:")
|
||||
_LOGGER.Info(ex)
|
||||
End Try
|
||||
|
||||
Dim oControlId = DirectCast(sender.Tag, ClassControlCreator.ControlMetadata).Guid
|
||||
@@ -835,7 +844,7 @@ Public Class frmFormDesigner
|
||||
|
||||
' Control-Id wurde nicht in DataRow gefunden
|
||||
If IsNothing(oRow) Then
|
||||
LOGGER.Info($"Error while filtering Controls by Guid '{oControlId}' in LoadControlProperties:")
|
||||
_LOGGER.Info($"Error while filtering Controls by Guid '{oControlId}' in LoadControlProperties:")
|
||||
MsgBox($"Control mit der Id {oControlId} wurde nicht gefunden!", MsgBoxStyle.Critical, "Fehler beim Laden der Control Eigenschaften")
|
||||
|
||||
Exit Sub
|
||||
@@ -1243,10 +1252,10 @@ Public Class frmFormDesigner
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
Dim oMsg = $"UpdateImage - Error while saving Control (Id: {CURRENT_CONTROL_ID}): {vbCrLf}{ex.Message}"
|
||||
MsgBox(oMsg)
|
||||
LOGGER.Info(oMsg)
|
||||
_LOGGER.Info(oMsg)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -1279,10 +1288,10 @@ Public Class frmFormDesigner
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
Dim oMsg = $"UpdateSingleValue - Fehler beim Speichern von Control (Id: {guid}, column: {columnName}): {vbCrLf}{ex.Message}"
|
||||
MsgBox(oMsg)
|
||||
LOGGER.Info(oMsg)
|
||||
_LOGGER.Info(oMsg)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -1301,7 +1310,7 @@ Public Class frmFormDesigner
|
||||
Catch ex As Exception
|
||||
Dim oMsg = $"MenuItemAddColumn_Click - Fehler beim Hinzufügen von einer neuen Spalte: {vbCrLf}{ex.Message}"
|
||||
MsgBox(oMsg)
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -1334,7 +1343,7 @@ Public Class frmFormDesigner
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Saving Profile SQLFinish: " & vbNewLine & vbNewLine & ex.Message)
|
||||
LOGGER.Error(ex)
|
||||
_LOGGER.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -1579,9 +1588,9 @@ Public Class frmFormDesigner
|
||||
RibPGCtrlWidth.Enabled = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info($"Error while Adding new control {ControlSelected}:")
|
||||
LOGGER.Info(ex)
|
||||
_LOGGER.Error(ex)
|
||||
_LOGGER.Info($"Error while Adding new control {ControlSelected}:")
|
||||
_LOGGER.Info(ex)
|
||||
End Try
|
||||
Me.Cursor = Cursors.Default
|
||||
ControlSelected = ""
|
||||
|
||||
Reference in New Issue
Block a user