Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 00:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Unzip problem

Discussion on Unzip problem within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
Regen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 509
Received Thanks: 41
Unzip problem

Hey,

ich bin es mal wieder mit einem Problem

Ich habe im Internet diese Klasse hier gefunden.

Code:
Imports Shell32
Imports System
Imports System.IO

Public Class ClassUnzip

    Private _file As String
    Private _folder As String
    Private _towhere As String

    Private _shell As Shell32.IShellDispatch2

    ''' <summary>Event welches vor dem Entpacken (Unzip) ausgeführt wird.</summary>
    ''' <remarks></remarks>
    Public Event Unzipstart()
    ''' <summary>Event welches nach dem Entpacken (Unzip) ausgeführt wird.</summary>
    ''' <remarks></remarks>
    Public Event UnzipFinishd()

    ''' <summary>Neue Instanz der ClassUnzip Klasse.</summary>
    ''' <param name="file">Datei welche entpackt werden soll.</param>
    ''' <param name="towhere">Zielordner.</param>
    ''' <remarks></remarks>
    Public Sub New(ByVal file As String, ByVal towhere As String)
        _file = file
        _towhere = towhere
        _folder = Path.Combine(Path.GetDirectoryName(_file), _towhere)
        _shell = CreateObject("Shell.Application")
    End Sub

    ''' <summary>Das Entpacken (Unzip) wird ausgeführt.</summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function UnzipNow() As Boolean
        'prüfen ob der ordner existiert
        If Directory.Exists(_folder) = False Then
            Directory.CreateDirectory(_folder)
        End If
        'event für start feuern
        RaiseEvent Unzipstart()
        'entpacken
        Dim temp As Shell32.Folder = _shell.NameSpace((_folder))
        If temp IsNot Nothing Then
            temp.CopyHere(_shell.NameSpace((_file)).Items)
        End If
        'event für ende feuern
        RaiseEvent UnzipFinishd()
        'rückgabe wert setzen
        Return True
    End Function

    ''' <summary>Gibt den Namen der gepackten Datei zurück, oder setzt diesen.</summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Property UnZipFile() As String
        Get
            Return _file
        End Get
        Set(ByVal value As String)
            _file = value
        End Set
    End Property

    ''' <summary>Gibt den Zielort (entpacken) zurück, oder setzt diesen.</summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Property UnzipTo() As String
        Get
            Return _towhere
        End Get
        Set(ByVal value As String)
            _towhere = value
        End Set
    End Property
End Class
und damit soll ich es ausführen.
Code:
  Dim file As String = "PFAD ZUM .zip ARCHIV"
        Dim cu As New ClassUnzip(file, Path.Combine(Path.GetDirectoryName(file), "test_unzip_folder"))
        AddHandler cu.UnzipFinishd, AddressOf Unziped
        cu.UnzipNow()
Wie bekomme ich das Windows Dialogfeld das den Status des Entpackens anzeigt weg?


Mit freundlichen Grüßen

Regen.
Regen. is offline  
Reply


Similar Threads Similar Threads
How to Unzip the Rappelz Models
06/11/2011 - Rappelz - 4 Replies
Hey there ;) I'm actually trying to get the Rappelz Client Archives Unzipped so I can start playin around with the whole client and maybe make some new weapons ect. But I googled 2 hours now and didn't found anything.. any help?



All times are GMT +1. The time now is 00:03.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.