Zooflow: use displayname

This commit is contained in:
Jonathan Jenne
2022-02-11 16:17:57 +01:00
parent 28e1407bf3
commit 8247ae8005
7 changed files with 35 additions and 12 deletions

View File

@@ -315,6 +315,7 @@ Public Class frmDocumentResultList
Private Async Function Watcher_UpdateFile(pFile As DocumentResultList.Watcher.OpenFile, pCreateNewVersion As Boolean) As Task
Dim oFileInfo As New FileInfo(pFile.FilePath)
Dim oDisplayName As String = pFile.Document.DisplayFileName
Dim oObjectId = Await _IDBClient.UpdateFileAsync(pFile.Document.Id, pFile.FilePath, New Options.UpdateFileOptions With {
.CreateNewFileVersion = pCreateNewVersion,
.Language = Environment.User.Language,
@@ -322,16 +323,17 @@ Public Class frmDocumentResultList
})
If IsNothing(oObjectId) Then
MsgBox($"Beim Speichern der Datei '{oFileInfo.Name}' Fehler ist ein Fehler aufgetreten!", MsgBoxStyle.Critical, Text)
MsgBox($"Beim Speichern der Datei '{oDisplayName}' Fehler ist ein Fehler aufgetreten!", MsgBoxStyle.Critical, Text)
Else
MsgBox($"Die Datei '{oFileInfo.Name}' wurde erfolgreich gespeichert!", MsgBoxStyle.Information, Text)
MsgBox($"Die Datei '{oDisplayName}' wurde erfolgreich gespeichert!", MsgBoxStyle.Information, Text)
RaiseEvent NeedsRefresh(Me, Params.ProfileGuid)
End If
End Function
Private Async Function Watcher_Ask(pFile As DocumentResultList.Watcher.OpenFile) As Task
Dim oFileInfo = New FileInfo(pFile.FilePath)
Dim oMessage = $"Die Datei '{oFileInfo.Name}' wurde außerhalb des Systems verändert. Wollen Sie diese Änderung als neue Version in das System übernehmen oder überschreiben?"
Dim oDisplayName = pFile.Document.DisplayFileName
Dim oMessage = $"Die Datei '{oDisplayName}' wurde außerhalb des Systems verändert. Wollen Sie diese Änderung als neue Version in das System übernehmen oder überschreiben?"
Dim oMessageBox As New MsgBoxEx(oMessage, "Datei verändert", MessageBoxIcon.Question)
oMessageBox.SetButtons("Überschreiben", "Neue Version", "Abbrechen")