Add virtual property to field value, improve ui when loading files, improve initial loading

This commit is contained in:
Jonathan Jenne
2022-04-08 13:17:46 +02:00
parent 623f75d0e5
commit 51912b36c2
7 changed files with 202 additions and 64 deletions

View File

@@ -27,15 +27,16 @@ Public Class frmMain
Logger = LogConfig.GetLogger()
Logger.Info("Starting {0}, Version [{1}]", Application.ProductName, Application.ProductVersion)
ShowLoadingUI()
Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmShared.Laden_des_Formulars)
HideLoadingUI()
End Try
End Sub
Private Async Sub frmMain_Shown(sender As Object, e As EventArgs) Handles Me.Shown
SplashScreenManager.ShowWaitForm()
Try
SplashScreenManager.SetWaitFormDescription("Initialisierung der Grundfunktionen")
@@ -70,7 +71,7 @@ Public Class frmMain
Database = New MSSQLServer(LogConfig, oConnectionString)
SplashScreenManager.SetWaitFormDescription("Lade Vorlagen")
GridControl1.DataSource = Await LoadTemplateData()
GridControlTemplates.DataSource = Await LoadTemplateData()
SplashScreenManager.SetWaitFormDescription("Lade Winline Stammdaten")
My.Winline = New WinlineData(LogConfig, Database, My.GeneralConfiguration, My.MappingConfiguration, My.MandatorConfiguration)
@@ -82,7 +83,7 @@ Public Class frmMain
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_der_Winline_Daten)
Finally
SplashScreenManager.CloseWaitForm()
HideLoadingUI()
End Try
End Sub
@@ -238,17 +239,17 @@ Public Class frmMain
Exit Sub
End If
SplashScreenManager.ShowWaitForm()
ShowLoadingUI()
Try
SplashScreenManager.SetWaitFormDescription("Lade Vorlagen")
GridControl1.DataSource = Await LoadTemplateData()
GridControlTemplates.DataSource = Await LoadTemplateData()
Catch ex As Exception
FormHelper.ShowError(ex, "Laden der Vorlagen")
Finally
SplashScreenManager.CloseWaitForm()
HideLoadingUI()
End Try
End Sub
@@ -258,7 +259,7 @@ Public Class frmMain
Exit Sub
End If
SplashScreenManager.ShowWaitForm()
ShowLoadingUI()
Try
SplashScreenManager.SetWaitFormDescription("Lade Winline Stammdaten")
@@ -268,8 +269,22 @@ Public Class frmMain
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_der_Winline_Daten)
Finally
SplashScreenManager.CloseWaitForm()
HideLoadingUI()
End Try
End Sub
Private Sub ShowLoadingUI()
SplashScreenManager.ShowWaitForm()
GridControlTemplates.Enabled = False
RibbonPageGroupData.Enabled = False
RibbonPageGroupStart.Enabled = False
End Sub
Private Sub HideLoadingUI()
GridControlTemplates.Enabled = True
RibbonPageGroupData.Enabled = True
RibbonPageGroupStart.Enabled = True
SplashScreenManager.CloseWaitForm()
End Sub
End Class