splash screen

This commit is contained in:
Jonathan Jenne
2023-12-14 14:52:19 +01:00
parent d8742332ec
commit eea1bd2177
13 changed files with 657 additions and 107 deletions

View File

@@ -28,25 +28,33 @@ Partial Public Class frmEnvelopeEditor
InitializeComponent()
End Sub
Private Sub btnNewFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnNewFile.ItemClick
Private Async Sub btnNewFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnNewFile.ItemClick
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
' prüfen ob es schon eine Datei gibt
If Documents.Count > 0 Then
MsgBox(Resources.Envelope.Only_one_file_is_allowed, MsgBoxStyle.Information, Text)
Return
End If
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Dim oDocument = Controller.CreateDocument(OpenFileDialog1.FileName)
If oDocument IsNot Nothing Then
Documents.Add(oDocument)
Else
MsgBox(Resources.Envelope.Document_Could_Not_Be_Saved, MsgBoxStyle.Critical, Text)
Try
' prüfen ob es schon eine Datei gibt
If Documents.Count > 0 Then
MsgBox(Resources.Envelope.Only_one_file_is_allowed, MsgBoxStyle.Information, Text)
Return
End If
End If
RibbonPageGroupAddSignature_Enabled()
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Dim oDocument = Await Controller.CreateDocument(OpenFileDialog1.FileName)
If oDocument IsNot Nothing Then
Documents.Add(oDocument)
Else
MsgBox(Resources.Envelope.Document_Could_Not_Be_Saved, MsgBoxStyle.Critical, Text)
End If
End If
Catch ex As Exception
Logger.Error(ex)
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
RibbonPageGroupAddSignature_Enabled()
End Try
End Sub
Private Sub frmEditor_Load(sender As Object, e As EventArgs) Handles Me.Load