Vor GridControl Length

This commit is contained in:
Developer01
2026-02-26 10:37:05 +01:00
parent 743ef3fe22
commit 54744a0531
4 changed files with 1529 additions and 1119 deletions

View File

@@ -15,6 +15,7 @@ Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraGrid.Views.Grid.ViewInfo
Imports DevExpress.XtraNavBar
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraSplashScreen
Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.EDMI.API.Constants
@@ -61,6 +62,7 @@ Public Class frmMain
Private DetailLinkActive As Boolean = False
Private FRONTEND_ACTION As String = "NONE"
Private Ev_Filter_Panel_Closed As Boolean = False
Private _overlayActive As Boolean = False
Dim omsgOpenWorkflow As String
Dim omsgTitleWarning As String
@@ -1398,6 +1400,13 @@ Public Class frmMain
' HAUPTLADEMETHODE - Koordiniert den gesamten Ladevorgang
' ========================================
Private Async Function Decide_Load(pIsFormLoad As Boolean, Optional ForceReload As Boolean = False) As Tasks.Task
Dim oHandle As Object = Nothing
Dim overlayStartedHere As Boolean = False
If Not _overlayActive Then
oHandle = SplashScreenManager.ShowOverlayForm(Me)
_overlayActive = True
overlayStartedHere = True
End If
Dim perfStart As DateTime = DateTime.MinValue
Dim refreshWasEnabled As Boolean = False
@@ -1436,10 +1445,10 @@ Public Class frmMain
LOGGER.Info("[PERF Decide_Load] ruft LoadOverviewData auf...")
End If
' UI vorbereiten
If Not PrepareGridForLoading() Then
Exit Function
End If
'' UI vorbereiten
'If Not PrepareGridForLoading() Then
' Exit Function
'End If
Await Task.Yield()
@@ -1451,10 +1460,10 @@ Public Class frmMain
LOGGER.Info("[PERF Decide_Load] ruft LoadProfileData auf...")
End If
' UI vorbereiten
If Not PrepareGridForLoading() Then
Exit Function
End If
'' UI vorbereiten
'If Not PrepareGridForLoading() Then
' Exit Function
'End If
Await Task.Yield()
@@ -1477,7 +1486,10 @@ Public Class frmMain
LOGGER.Info("Unexpected error in Decide_load: " & ex.Message)
Finally
FRONTEND_ACTION = FA_NONE
If overlayStartedHere Then
_overlayActive = False
SplashScreenManager.CloseOverlayForm(oHandle)
End If
If refreshWasEnabled Then
TimerRefresh.Start()
End If
@@ -1491,33 +1503,6 @@ Public Class frmMain
End If
End Try
End Function
' ========================================
' UI-VORBEREITUNG - Macht Grid sichtbar und zeigt LoadingPanel
' ========================================
Private Function PrepareGridForLoading() As Boolean
Try
' Grid sichtbar machen
If GridControlWorkflows.Visible = False Then
GridControlWorkflows.Visible = True
End If
' UI-Thread Zeit geben
Application.DoEvents()
' LoadingPanel anzeigen
GridViewWorkflows.ShowLoadingPanel()
' Nochmal Zeit zum Rendern
Application.DoEvents()
Return True
Catch ex As Exception
LOGGER.Error(ex)
Return False
End Try
End Function
' ========================================
' OVERVIEW DATEN LADEN - Spezialisiert auf Overview
' ========================================
@@ -1686,9 +1671,6 @@ Public Class frmMain
GridControlWorkflows.EndUpdate()
End If
' LoadingPanel verstecken (NUR HIER!)
GridViewWorkflows.HideLoadingPanel()
If LOG_HOTSPOTS Then
Dim totalElapsed = (DateTime.Now - perfStart).TotalMilliseconds
If totalElapsed > 4000 Then
@@ -1759,9 +1741,6 @@ Public Class frmMain
If gridUpdateStarted Then
GridControlWorkflows.EndUpdate()
End If
' LoadingPanel verstecken (NUR HIER!)
GridViewWorkflows.HideLoadingPanel()
End Try
End Function
@@ -2548,11 +2527,9 @@ Public Class frmMain
Dim viewUpdateStarted As Boolean = False
Dim layoutRestored As Boolean = False
Dim resetLayoutTriggered As Boolean = False
Dim showLoadingPanel As Boolean = False
Dim useWaitCursorApplied As Boolean = False
Dim previousMessage As String = bsiMessage.Caption
Dim loadingMessageApplied As Boolean = False
Dim gridWasMadeVisible As Boolean = False
If LOG_HOTSPOTS Then
perfStart = DateTime.Now
@@ -2564,24 +2541,11 @@ Public Class frmMain
' SCHRITT 1: Grid sichtbar machen
If GridControlWorkflows.Visible = False Then
GridControlWorkflows.Visible = True
gridWasMadeVisible = True
End If
GRID_LOAD_TYPE = "OVERVIEW"
CURRENT_CLICKED_PROFILE_ID = 0
' SCHRITT 2: UI-Thread Zeit geben, das Grid zu rendern
Application.DoEvents()
Await Task.Delay(100)
' SCHRITT 3: LoadingPanel anzeigen (jetzt ist das Grid definitiv sichtbar!)
GridViewWorkflows.ShowLoadingPanel()
showLoadingPanel = True
' SCHRITT 4: UI-Thread Zeit zum Rendern des LoadingPanels geben
Application.DoEvents()
Await Task.Delay(150)
If LOG_HOTSPOTS Then
Dim elapsed = (DateTime.Now - perfStep).TotalMilliseconds
If elapsed > 4000 Then
@@ -2876,7 +2840,6 @@ Public Class frmMain
Finally
' ========== AUFRÄUMEN ==========
' EndUpdate IMMER aufrufen (vor dem Verstecken des LoadingPanel)
If viewUpdateStarted Then
GridViewWorkflows.EndUpdate()
End If
@@ -2884,11 +2847,6 @@ Public Class frmMain
GridControlWorkflows.EndUpdate()
End If
' LoadingPanel SOFORT nach EndUpdate verstecken
If showLoadingPanel Then
GridViewWorkflows.HideLoadingPanel()
End If
' WaitCursor entfernen
If useWaitCursorApplied Then
Me.UseWaitCursor = False