MS FileMove

This commit is contained in:
2024-03-13 10:59:00 +01:00
parent 86d9bd185a
commit a2b0682a77
6 changed files with 25 additions and 43 deletions

View File

@@ -1,4 +1,5 @@
Imports System.ComponentModel
Imports System.IO
Imports DevExpress.Export.Xl
Imports DevExpress.Utils.Drawing
Imports DevExpress.XtraEditors
@@ -340,7 +341,7 @@ Partial Public Class frmEnvelopeEditor
End If
Me.Close()
End If
End If
End If
End Sub
@@ -363,9 +364,12 @@ Partial Public Class frmEnvelopeEditor
' Verschiebe die Datei
Try
pDestinationPath &= "\" + oFilename
System.IO.File.Move(pSourcePath, pDestinationPath, True)
If File.Exists(pDestinationPath) Then
File.Delete(pDestinationPath)
End If
System.IO.File.Move(pSourcePath, pDestinationPath)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error in FileMove")
End Try
Else
@@ -511,9 +515,4 @@ Partial Public Class frmEnvelopeEditor
End If
End Sub
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
For Each odoc In Envelope.Documents
MsgBox(odoc.Filename & vbNewLine & odoc.Filepath)
Next
End Sub
End Class