Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #19941 |

    I’ve been looking over the documentation and examples for a couple of hours now, and I guess I am a dumba**, because I can’t figure out how to do a simple task.

    I need to zip up a single large file using a method that reports progress (in percentage) using an event. I know this can probably be done in just a few lines, but I’m stumped.

    Anyone have a VB.NET example handy?


    Imported from legacy forums. Posted by Ted (had 2256 views)

    Xceed Support
    Post count: 5658

    Here is some VB.NET sample code:

    Private Shared Sub SimpleZipWithEventForum12502()
    Dim zipFile As AbstractFile = New DiskFile(“D:\”)
    Dim archive As New ZipArchive(zipFile)

    Dim events As New ZipEvents()
    AddHandler events.ByteProgression, AddressOf events_ByteProgression2

    Dim textFile As AbstractFile = New DiskFile(“D:\Test.txt”)

    textFile.CopyTo(events, Nothing, archive, True)
    End Sub

    Private Shared Sub events_ByteProgression2(ByVal sender As Object, ByVal e As ByteProgressionEventArgs)
    Console.WriteLine(“Progression: ” + e.AllFilesBytes.Percent.ToString() + “%”)
    End Sub

    Imported from legacy forums. Posted by CharlesB (had 3423 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.