Cockpit Active auswerten, Expanded bei nur einem Cockpit
This commit is contained in:
@@ -563,7 +563,23 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' ===== NUR AKTIVE KNOTEN BEHALTEN =====
|
||||
If oDT_STRUCTURE_NODES.Columns.Contains("ACTIVE") Then
|
||||
Dim oInactiveRows As DataRow() = oDT_STRUCTURE_NODES.Select("ACTIVE = 0 OR ACTIVE IS NULL")
|
||||
If oInactiveRows.Length > 0 Then
|
||||
LOGGER.Debug($"Load_Treeview: Removing [{oInactiveRows.Length}] inactive node(s) (ACTIVE=0 or NULL)")
|
||||
For Each oRow As DataRow In oInactiveRows
|
||||
oRow.Delete()
|
||||
Next
|
||||
oDT_STRUCTURE_NODES.AcceptChanges()
|
||||
End If
|
||||
Else
|
||||
LOGGER.Warn("Load_Treeview: ACTIVE column not found in FNTF_GET_COCKPIT_DEFINITION result")
|
||||
End If
|
||||
|
||||
' ===== ANZAHL DER OVERVIEW-KNOTEN ERMITTELN (VOR WEITEREN FILTERN) =====
|
||||
Dim oOverviewRows As DataRow() = oDT_STRUCTURE_NODES.Select("TYPE_ID = 0")
|
||||
LOGGER.Debug($"Load_Treeview: Found [{oOverviewRows.Length}] node(s) with TYPE_ID=0 (Overview)")
|
||||
|
||||
' ===== MONITOR-KNOTEN ENTFERNEN WENN KEIN RECHT =====
|
||||
If MONITORING_ACTIVE = False AndAlso oDT_STRUCTURE_NODES.Columns.Contains("TYPE_ID") Then
|
||||
@@ -576,6 +592,7 @@ Public Class frmMain
|
||||
oDT_STRUCTURE_NODES.AcceptChanges()
|
||||
End If
|
||||
End If
|
||||
|
||||
' ===== CHART-KNOTEN ENTFERNEN WENN KEIN RECHT =====
|
||||
If SHOW_CHARTS = False AndAlso oDT_STRUCTURE_NODES.Columns.Contains("TYPE_ID") Then
|
||||
Dim oChartRows As DataRow() = oDT_STRUCTURE_NODES.Select("TYPE_ID = 3")
|
||||
@@ -596,7 +613,6 @@ Public Class frmMain
|
||||
TreeList_Cockpit.ParentFieldName = "PARENT_ID"
|
||||
TreeList_Cockpit.Columns("PK_RESULT_ID").SortOrder = SortOrder.Ascending
|
||||
|
||||
|
||||
' ===== MODERNES DESIGN =====
|
||||
' Schriftgröße und -art
|
||||
TreeList_Cockpit.Appearance.Row.Font = New Font("Segoe UI", 12, FontStyle.Regular)
|
||||
@@ -614,7 +630,6 @@ Public Class frmMain
|
||||
' Zeilenhöhe erhöhen für bessere Lesbarkeit
|
||||
TreeList_Cockpit.RowHeight = 28
|
||||
|
||||
|
||||
Dim oVisibleColumns As New System.Collections.Generic.HashSet(Of String)(StringComparer.OrdinalIgnoreCase) From {"NAME"}
|
||||
For Each oColumn As DevExpress.XtraTreeList.Columns.TreeListColumn In TreeList_Cockpit.Columns
|
||||
oColumn.Visible = oVisibleColumns.Contains(oColumn.FieldName)
|
||||
@@ -622,32 +637,34 @@ Public Class frmMain
|
||||
Finally
|
||||
TreeList_Cockpit.EndUpdate()
|
||||
End Try
|
||||
|
||||
' ===== KNOTEN AUF-/ZUKLAPPEN BASIEREND AUF ANZAHL DER OVERVIEW-KNOTEN =====
|
||||
If oOverviewRows.Length = 1 Then
|
||||
LOGGER.Debug("Load_Treeview: Only 1 overview node found - expanding all nodes")
|
||||
For Each oNode As DevExpress.XtraTreeList.Nodes.TreeListNode In TreeList_Cockpit.Nodes
|
||||
oNode.Expanded = True
|
||||
Next
|
||||
ElseIf oOverviewRows.Length > 1 Then
|
||||
LOGGER.Debug($"Load_Treeview: [{oOverviewRows.Length}] overview nodes found - collapsing all nodes")
|
||||
For Each oNode As DevExpress.XtraTreeList.Nodes.TreeListNode In TreeList_Cockpit.Nodes
|
||||
oNode.Expanded = False
|
||||
Next
|
||||
Else
|
||||
LOGGER.Warn("Load_Treeview: No overview nodes (TYPE_ID=0) found - keeping default collapsed state")
|
||||
End If
|
||||
|
||||
' AddHandler TreeList_Cockpit.GetSelectImage, AddressOf TreeList1_GetSelectImage
|
||||
TreeList_Cockpit.Refresh() ' ✅ Erzwingt sofortiges Neuzeichnen der Icons
|
||||
|
||||
TreeList_Cockpit.Refresh()
|
||||
|
||||
' ===== ANZAHL ASYNCHRON NACHLADEN =====
|
||||
If oDT_STRUCTURE_NODES.Columns.Contains("SQL_QUERY_COUNT") Then
|
||||
AppendCountsToTreeAsync()
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Sub TreeList_Cockpit_CustomDrawNodeCell(sender As Object, e As DevExpress.XtraTreeList.CustomDrawNodeCellEventArgs)
|
||||
Try
|
||||
|
||||
@@ -316,8 +316,8 @@
|
||||
<Reference Include="Mail">
|
||||
<HintPath>M:\Bibliotheken\3rdParty\Limilabs\Mail.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.5\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.10.0.9\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.Cryptography, Version=10.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.Cryptography.10.0.5\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
|
||||
@@ -326,6 +326,24 @@
|
||||
<HintPath>..\packages\Microsoft.Bcl.HashCode.6.0.0\lib\net462\Microsoft.Bcl.HashCode.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.10.0.0\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.10.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Options.10.0.0\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Primitives.10.0.0\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Identity.Client.4.55.0\lib\net461\Microsoft.Identity.Client.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -385,6 +403,9 @@
|
||||
<Reference Include="System.Data.OracleClient" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=10.0.0.9, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.10.0.9\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.DirectoryServices.AccountManagement" />
|
||||
<Reference Include="System.Drawing" />
|
||||
|
||||
Reference in New Issue
Block a user