Verbesserungen

This commit is contained in:
Developer01
2025-12-05 14:02:41 +01:00
parent 5c0120cca8
commit a34f55702b
23 changed files with 529 additions and 188 deletions

View File

@@ -77,7 +77,6 @@ Public Class frmNodeNavigation
Public CtrlBuilder As ClassControlBuilder
Public CtrlCommandUI As ClassControlCommandsUI
Public JumpKeyID As Long
Private Property ParentNodeChangeinAction As Boolean = False
Private Property ChildNodeGuid As Integer = 0
@@ -95,7 +94,7 @@ Public Class frmNodeNavigation
Delete
End Enum
#End Region
Public Sub New(pEntityID As Int16, pConstructID As Int16, pNodeKeyID As Integer)
Public Sub New(pEntityID As Int16, pConstructID As Int16)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
@@ -110,7 +109,6 @@ Public Class frmNodeNavigation
Current_DocList = New ClassDocGrid(GridViewDoc_Search)
WindowsEx = New WindowsEx(LOGCONFIG)
JumpKeyID = pNodeKeyID
ClassNodeCommands = New ClassNodeCommands(LOGCONFIG, MYDB_ECM)
End Sub
@@ -262,6 +260,7 @@ Public Class frmNodeNavigation
End If
Next
JumptoNode()
Catch ex As Exception
NNLogger.Error(ex)
@@ -2528,6 +2527,11 @@ Public Class frmNodeNavigation
Else
tsmiFileRenameDisplayname.Visible = False
End If
If CURRENT_ENTITY_ID <> OF_FILESTORE_ENTITY Then
TsmitmJumpToFilestore.Visible = True
Else
TsmitmJumpToFilestore.Visible = False
End If
Else
tsmiFileRenameDisplayname.Visible = False
End If
@@ -2766,13 +2770,28 @@ Public Class frmNodeNavigation
Me.BringToFront()
TreeListDevexpress.CollapseAll()
FORM_SHOWN = True
If JumpKeyID > 0 Then
JumptoNode()
End If
End Sub
Public Sub JumptoNode()
If JumpKeyID > 0 Then
TreeListDevexpress.FindNodeByKeyID(JumpKeyID)
If JUMP_ID > 0 Then
If TreeListDevexpress.DataSource Is Nothing OrElse TreeListDevexpress.Nodes.Count = 0 Then
NNLogger.Debug("JumptoNode: TreeList noch nicht geladen. Warte bis Load_nodes fertig ist.")
' Frühzeitiger Exit Load_nodes springt später
Exit Sub
End If
Dim targetGuid As Integer = Convert.ToInt32(JUMP_ID)
' Suche über Datenfeld "GUID" statt über die interne Node-Id
Dim oFindNode As TreeListNode = TreeListDevexpress.FindNodeByFieldValue("GUID", targetGuid)
If oFindNode IsNot Nothing Then
' Sichtbar machen (expandiert ggf. Eltern)
TreeListDevexpress.MakeNodeVisible(oFindNode)
' Fokus setzen
TreeListDevexpress.SetFocusedNode(oFindNode)
' Optional: markieren
TreeListDevexpress.FocusedNode = oFindNode
Else
NNLogger.Warn($"JumpToNode: kein Knoten mit GUID={JUMP_ID} gefunden.")
End If
JUMP_ID = 0
End If
End Sub
Private Async Sub tsmiFileRenameDisplayname_Click(sender As Object, e As EventArgs) Handles tsmiFileRenameDisplayname.Click
@@ -2843,10 +2862,7 @@ Public Class frmNodeNavigation
End Sub
Private Sub frmNodeNavigation_Click(sender As Object, e As EventArgs) Handles MyBase.Click
If CURRENT_ENTITY_ID <> _EntityId Then
CURRENT_ENTITY_ID = _EntityId
CURRENT_RECORD_ID = 0
End If
End Sub
Private Sub tsmiFileOpen_Click(sender As Object, e As EventArgs) Handles tsmiFileOpen.Click
@@ -3701,4 +3717,47 @@ Public Class frmNodeNavigation
frmFileInWork.ShowDialog()
Await RUN_DOCSEARCH(True)
End Sub
Private Sub frmNodeNavigation_Activated(sender As Object, e As EventArgs) Handles Me.Activated
If CURRENT_ENTITY_ID <> CurrentEntityId Then
CURRENT_ENTITY_ID = CurrentEntityId
CURRENT_RECORD_ID = 0
End If
End Sub
Public ReadOnly Property CurrentEntityId As Short
Get
Return _EntityId
End Get
End Property
Private Sub TsmitmJumpToFilestore_Click(sender As Object, e As EventArgs) Handles TsmitmJumpToFilestore.Click
Try
If mySelectedDocs.Count = 1 Then
Dim oDocId As Integer = mySelectedDocs.First.DocId
Dim oJumpToDocSQL = String.Format("DECLARE @PID BIGINT
SELECT @PID = dwParentID FROM TBPMO_DOCRESULT_LIST WHERE DocID = {0}
SELECT GUID FROM VWPMO_STRUCTURE_NODES WHERE ENTITY_ID = {1} AND ISNUMERIC(ID1) = 1 AND ID1 = @PID", oDocId, OF_FILESTORE_ENTITY)
Dim ojumpID As Integer = MYDB_ECM.GetScalarValue(oJumpToDocSQL)
If Not IsNothing(ojumpID) AndAlso ojumpID <> 0 Then
OpenFormConstructor(OF_FILESTORE_CONSTRUCTOR, 1, OF_FILESTORE_ENTITY, ojumpID)
Else
MessageBox.Show("A parent node could not be found!", "No Node found", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
End If
Catch ex As Exception
MessageBox.Show("Unerwarteter Fehler beim Springen zum Filestore-Knoten: " & ex.Message, "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub FindNode_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles FindNode.ItemClick
Dim oNode = TreeListDevexpress.FindNodeByFieldValue("GUID", BarEditItem1.EditValue)
If Not IsNothing(oNode) Then
TreeListDevexpress.FocusedNode = oNode
TreeListDevexpress.MakeNodeVisible(oNode)
Else
MessageBox.Show("Knoten nicht gefunden!", "Knoten nicht gefunden", MessageBoxButtons.OK, MessageBoxIcon.Warning)
End If
End Sub
End Class