splash screen
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Imports System.Drawing
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports DevExpress.Utils.Svg
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
|
||||
@@ -94,4 +96,16 @@ Public Class Helpers
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Async Function CopyFileAsync(sourceFile As String, destinationFile As String) As Task
|
||||
Dim fileOptions = IO.FileOptions.Asynchronous Or IO.FileOptions.SequentialScan
|
||||
Dim bufferSize = 4096
|
||||
|
||||
Using sourceStream = New FileStream(sourceFile, FileMode.Open, FileAccess.Read, FileShare.Read, bufferSize, fileOptions)
|
||||
|
||||
Using destinationStream = New FileStream(destinationFile, FileMode.CreateNew, FileAccess.Write, FileShare.None, bufferSize, fileOptions)
|
||||
Await sourceStream.CopyToAsync(destinationStream, bufferSize).ConfigureAwait(False)
|
||||
End Using
|
||||
End Using
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user