diff --git a/SharpZlib.build b/SharpZlib.build index 1d01e78d8..0423e2fcd 100644 --- a/SharpZlib.build +++ b/SharpZlib.build @@ -30,7 +30,7 @@ - + @@ -63,11 +63,11 @@ - - - - - + + + + + diff --git a/samples/cs/CreateZipFile/AssemblyInfo.cs b/samples/cs/CreateZipFile/AssemblyInfo.cs index 1b2d3ae56..38750042e 100644 --- a/samples/cs/CreateZipFile/AssemblyInfo.cs +++ b/samples/cs/CreateZipFile/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("0.85.2.329")] +[assembly: AssemblyVersion("0.85.3.364")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] diff --git a/samples/cs/FastZip/AssemblyInfo.cs b/samples/cs/FastZip/AssemblyInfo.cs index 531033b80..43dfff1a6 100644 --- a/samples/cs/FastZip/AssemblyInfo.cs +++ b/samples/cs/FastZip/AssemblyInfo.cs @@ -23,7 +23,7 @@ // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("0.85.2.329")] +[assembly: AssemblyVersion("0.85.3.364")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. diff --git a/samples/cs/minibzip2/AssemblyInfo.cs b/samples/cs/minibzip2/AssemblyInfo.cs index c36ff3c8d..9ffeb320c 100644 --- a/samples/cs/minibzip2/AssemblyInfo.cs +++ b/samples/cs/minibzip2/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("0.85.2.329")] +[assembly: AssemblyVersion("0.85.3.364")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] diff --git a/samples/cs/minigzip/AssemblyInfo.cs b/samples/cs/minigzip/AssemblyInfo.cs index c36ff3c8d..9ffeb320c 100644 --- a/samples/cs/minigzip/AssemblyInfo.cs +++ b/samples/cs/minigzip/AssemblyInfo.cs @@ -10,7 +10,7 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("0.85.2.329")] +[assembly: AssemblyVersion("0.85.3.364")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile("")] diff --git a/samples/cs/sz/AssemblyInfo.cs b/samples/cs/sz/AssemblyInfo.cs index 4a2a8a21f..71f121417 100644 --- a/samples/cs/sz/AssemblyInfo.cs +++ b/samples/cs/sz/AssemblyInfo.cs @@ -23,7 +23,7 @@ // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("0.85.2.329")] +[assembly: AssemblyVersion("0.85.3.364")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. diff --git a/samples/cs/tar/AssemblyInfo.cs b/samples/cs/tar/AssemblyInfo.cs index 4085bae7e..d5db144f4 100644 --- a/samples/cs/tar/AssemblyInfo.cs +++ b/samples/cs/tar/AssemblyInfo.cs @@ -23,7 +23,7 @@ // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("0.85.2.329")] +[assembly: AssemblyVersion("0.85.3.364")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. diff --git a/samples/cs/zf/AssemblyInfo.cs b/samples/cs/zf/AssemblyInfo.cs index 929a68eda..0955b375d 100644 --- a/samples/cs/zf/AssemblyInfo.cs +++ b/samples/cs/zf/AssemblyInfo.cs @@ -26,7 +26,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.85.2.329")] +[assembly: AssemblyVersion("0.85.3.364")] // // In order to sign your assembly you must specify a key to use. Refer to the diff --git a/samples/vb/CreateZipFile/CreateZipFile.sln b/samples/vb/CreateZipFile/CreateZipFile.sln new file mode 100644 index 000000000..e0d5e624a --- /dev/null +++ b/samples/vb/CreateZipFile/CreateZipFile.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +# SharpDevelop 2.2.0.2595 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CreateZipFile", "CreateZipFile.vbproj", "{1B2FD768-E530-45B7-B14F-AE5D07B24485}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1B2FD768-E530-45B7-B14F-AE5D07B24485}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B2FD768-E530-45B7-B14F-AE5D07B24485}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B2FD768-E530-45B7-B14F-AE5D07B24485}.Release|Any CPU.Build.0 = Release|Any CPU + {1B2FD768-E530-45B7-B14F-AE5D07B24485}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/samples/vb/CreateZipFile/CreateZipFile.vbproj b/samples/vb/CreateZipFile/CreateZipFile.vbproj new file mode 100644 index 000000000..9b413b9a2 --- /dev/null +++ b/samples/vb/CreateZipFile/CreateZipFile.vbproj @@ -0,0 +1,64 @@ + + + Debug + AnyCPU + 2.0 + {1B2FD768-E530-45B7-B14F-AE5D07B24485} + CreateZipFile + CreateZipFile + WinExe + + + + + + + OnSuccessfulBuild + + + + + True + True + + True + + bin\Debug\ + False + + + False + True + + False + + bin\Release\ + False + + + + + + + + ..\..\..\bin\ICSharpCode.SharpZipLib.dll + True + + + + + Form + + + + Designer + MainForm.vb + + + + + + + + + \ No newline at end of file diff --git a/samples/vb/CreateZipFile/MainForm.resources b/samples/vb/CreateZipFile/MainForm.resources new file mode 100644 index 000000000..f694350db Binary files /dev/null and b/samples/vb/CreateZipFile/MainForm.resources differ diff --git a/samples/vb/CreateZipFile/MainForm.vb b/samples/vb/CreateZipFile/MainForm.vb index 9f9e77150..72d343db6 100644 --- a/samples/vb/CreateZipFile/MainForm.vb +++ b/samples/vb/CreateZipFile/MainForm.vb @@ -37,167 +37,171 @@ Namespace CreateZipFile Public Class MainForm Inherits System.Windows.Forms.Form - Private btnZipIt As System.Windows.Forms.Button - Private label2 As System.Windows.Forms.Label + Private label2 As System.Windows.Forms.Label Private label1 As System.Windows.Forms.Label Private txtSourceDir As System.Windows.Forms.TextBox - Private folderBrowserDialog As System.Windows.Forms.FolderBrowserDialog - Private btnBrowseForFolder As System.Windows.Forms.Button - Private txtZipFileName As System.Windows.Forms.TextBox - - Public Shared Sub Main - Dim fMainForm As New MainForm - fMainForm.ShowDialog() - End Sub - - Public Sub New() - MyBase.New - ' - ' The Me.InitializeComponent call is required for Windows Forms designer support. - ' - Me.InitializeComponent - ' - ' TODO : Add constructor code after InitializeComponents - ' - End Sub - - #Region " Windows Forms Designer generated code " - ' This method is required for Windows Forms designer support. - ' Do not change the method contents inside the source code editor. The Forms designer might - ' not be able to load this method if it was changed manually. - Private Sub InitializeComponent() - Me.txtZipFileName = New System.Windows.Forms.TextBox - Me.btnBrowseForFolder = New System.Windows.Forms.Button - Me.folderBrowserDialog = New System.Windows.Forms.FolderBrowserDialog - Me.txtSourceDir = New System.Windows.Forms.TextBox - Me.label1 = New System.Windows.Forms.Label - Me.label2 = New System.Windows.Forms.Label - Me.btnZipIt = New System.Windows.Forms.Button - Me.SuspendLayout - ' - 'txtZipFileName - ' - Me.txtZipFileName.Location = New System.Drawing.Point(16, 40) - Me.txtZipFileName.Name = "txtZipFileName" - Me.txtZipFileName.TabIndex = 2 - Me.txtZipFileName.Text = "Demo.Zip" - ' - 'btnBrowseForFolder - ' - Me.btnBrowseForFolder.Location = New System.Drawing.Point(408, 40) - Me.btnBrowseForFolder.Name = "btnBrowseForFolder" - Me.btnBrowseForFolder.Size = New System.Drawing.Size(32, 23) - Me.btnBrowseForFolder.TabIndex = 4 - Me.btnBrowseForFolder.Text = "..." - AddHandler Me.btnBrowseForFolder.Click, AddressOf Me.BtnBrowseForFolderClick - ' - 'txtSourceDir - ' - Me.txtSourceDir.Location = New System.Drawing.Point(144, 40) - Me.txtSourceDir.Name = "txtSourceDir" - Me.txtSourceDir.Size = New System.Drawing.Size(256, 21) - Me.txtSourceDir.TabIndex = 3 - Me.txtSourceDir.Text = "" - ' - 'label1 - ' - Me.label1.Location = New System.Drawing.Point(144, 8) - Me.label1.Name = "label1" - Me.label1.Size = New System.Drawing.Size(224, 23) - Me.label1.TabIndex = 1 - Me.label1.Text = "Source directory:" - Me.label1.TextAlign = System.Drawing.ContentAlignment.BottomLeft - ' - 'label2 - ' - Me.label2.Location = New System.Drawing.Point(16, 8) - Me.label2.Name = "label2" - Me.label2.TabIndex = 0 - Me.label2.Text = "Zip File Name:" - Me.label2.TextAlign = System.Drawing.ContentAlignment.BottomLeft - ' - 'btnZipIt - ' - Me.btnZipIt.Location = New System.Drawing.Point(448, 40) - Me.btnZipIt.Name = "btnZipIt" - Me.btnZipIt.TabIndex = 5 - Me.btnZipIt.Text = "ZipIt" - AddHandler Me.btnZipIt.Click, AddressOf Me.BtnZipItClick - ' - 'MainForm - ' - Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14) - Me.ClientSize = New System.Drawing.Size(552, 86) - Me.Controls.Add(Me.label2) - Me.Controls.Add(Me.label1) - Me.Controls.Add(Me.txtSourceDir) - Me.Controls.Add(Me.txtZipFileName) - Me.Controls.Add(Me.btnBrowseForFolder) - Me.Controls.Add(Me.btnZipIt) - Me.Name = "MainForm" - Me.Text = "MainForm" - Me.ResumeLayout(false) - End Sub - #End Region - - Private Sub BtnBrowseForFolderClick(sender As System.Object, e As System.EventArgs) - If folderBrowserDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then - txtSourceDir.Text = folderBrowserDialog.SelectedPath - End If - End Sub - - Private Sub BtnZipItClick(sender As System.Object, e As System.EventArgs) - Dim sourceDir As String = txtSourceDir.Text.Trim() - - ' Simple sanity checks - If sourceDir.Length = 0 - MessageBox.Show("Please specify a directory") - Return - Else - If Not Directory.Exists(sourceDir) - MessageBox.Show(sourceDir, "Directory not found") - Return - End If - End If - - Dim targetName As String = txtZipFileName.Text.Trim() - If targetName.Length = 0 Then - MessageBox.Show("No name specified", "Zip file name error") - Return - End If - - Dim astrFileNames() As String = Directory.GetFiles(sourceDir) - Dim strmZipOutputStream As ZipOutputStream - - strmZipOutputStream = New ZipOutputStream(File.Create(targetName)) + Private folderBrowserDialog As System.Windows.Forms.FolderBrowserDialog + Friend WithEvents btnBrowseForFolder As System.Windows.Forms.Button + Friend WithEvents btnZipIt As System.Windows.Forms.Button + Private txtZipFileName As System.Windows.Forms.TextBox - REM Compression Level: 0-9 - REM 0: no(Compression) - REM 9: maximum compression - strmZipOutputStream.SetLevel(9) - - Dim strFile As String - - For Each strFile In astrFileNames - Dim strmFile As FileStream = File.OpenRead(strFile) - Dim abyBuffer(strmFile.Length - 1) As Byte - - strmFile.Read(abyBuffer, 0, abyBuffer.Length) - Dim objZipEntry As ZipEntry = New ZipEntry(strFile) - - objZipEntry.DateTime = DateTime.Now - objZipEntry.Size = strmFile.Length - strmFile.Close() - strmZipOutputStream.PutNextEntry(objZipEntry) - strmZipOutputStream.Write(abyBuffer, 0, abyBuffer.Length) - - Next - - strmZipOutputStream.Finish() - strmZipOutputStream.Close() - - MessageBox.Show("Operation complete") - End Sub + Public Shared Sub Main() + Dim fMainForm As New MainForm + fMainForm.ShowDialog() + End Sub + + Public Sub New() + MyBase.New() + ' + ' The Me.InitializeComponent call is required for Windows Forms designer support. + ' + Me.InitializeComponent() + ' + ' TODO : Add constructor code after InitializeComponents + ' + End Sub + +#Region " Windows Forms Designer generated code " + ' This method is required for Windows Forms designer support. + ' Do not change the method contents inside the source code editor. The Forms designer might + ' not be able to load this method if it was changed manually. + Private Sub InitializeComponent() + Me.txtZipFileName = New System.Windows.Forms.TextBox + Me.folderBrowserDialog = New System.Windows.Forms.FolderBrowserDialog + Me.txtSourceDir = New System.Windows.Forms.TextBox + Me.label1 = New System.Windows.Forms.Label + Me.label2 = New System.Windows.Forms.Label + Me.btnBrowseForFolder = New System.Windows.Forms.Button + Me.btnZipIt = New System.Windows.Forms.Button + Me.SuspendLayout() + ' + 'txtZipFileName + ' + Me.txtZipFileName.Location = New System.Drawing.Point(16, 37) + Me.txtZipFileName.Name = "txtZipFileName" + Me.txtZipFileName.Size = New System.Drawing.Size(100, 20) + Me.txtZipFileName.TabIndex = 2 + Me.txtZipFileName.Text = "Demo.Zip" + ' + 'txtSourceDir + ' + Me.txtSourceDir.Location = New System.Drawing.Point(144, 37) + Me.txtSourceDir.Name = "txtSourceDir" + Me.txtSourceDir.Size = New System.Drawing.Size(256, 20) + Me.txtSourceDir.TabIndex = 3 + ' + 'label1 + ' + Me.label1.Location = New System.Drawing.Point(144, 7) + Me.label1.Name = "label1" + Me.label1.Size = New System.Drawing.Size(224, 22) + Me.label1.TabIndex = 1 + Me.label1.Text = "Source directory:" + Me.label1.TextAlign = System.Drawing.ContentAlignment.BottomLeft + ' + 'label2 + ' + Me.label2.Location = New System.Drawing.Point(16, 7) + Me.label2.Name = "label2" + Me.label2.Size = New System.Drawing.Size(100, 22) + Me.label2.TabIndex = 0 + Me.label2.Text = "Zip File Name:" + Me.label2.TextAlign = System.Drawing.ContentAlignment.BottomLeft + ' + 'btnBrowseForFolder + ' + Me.btnBrowseForFolder.Location = New System.Drawing.Point(406, 37) + Me.btnBrowseForFolder.Name = "btnBrowseForFolder" + Me.btnBrowseForFolder.Size = New System.Drawing.Size(32, 21) + Me.btnBrowseForFolder.TabIndex = 6 + Me.btnBrowseForFolder.Text = "..." + Me.btnBrowseForFolder.UseVisualStyleBackColor = True + ' + 'btnZipIt + ' + Me.btnZipIt.Location = New System.Drawing.Point(455, 37) + Me.btnZipIt.Name = "btnZipIt" + Me.btnZipIt.Size = New System.Drawing.Size(75, 20) + Me.btnZipIt.TabIndex = 7 + Me.btnZipIt.Text = "Zip It" + Me.btnZipIt.UseVisualStyleBackColor = True + ' + 'MainForm + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) + Me.ClientSize = New System.Drawing.Size(552, 86) + Me.Controls.Add(Me.btnZipIt) + Me.Controls.Add(Me.btnBrowseForFolder) + Me.Controls.Add(Me.label2) + Me.Controls.Add(Me.label1) + Me.Controls.Add(Me.txtSourceDir) + Me.Controls.Add(Me.txtZipFileName) + Me.Name = "MainForm" + Me.Text = "MainForm" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub +#End Region + + Private Sub BtnBrowseForFolderClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowseForFolder.Click + If folderBrowserDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then + txtSourceDir.Text = folderBrowserDialog.SelectedPath + End If + End Sub + + Private Sub BtnZipItClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnZipIt.Click + Dim sourceDir As String = txtSourceDir.Text.Trim() + + ' Simple sanity checks + If sourceDir.Length = 0 Then + MessageBox.Show("Please specify a directory") + Return + Else + If Not Directory.Exists(sourceDir) Then + MessageBox.Show(sourceDir, "Directory not found") + Return + End If + End If + + Dim targetName As String = txtZipFileName.Text.Trim() + If targetName.Length = 0 Then + MessageBox.Show("No name specified", "Zip file name error") + Return + End If + + Dim astrFileNames() As String = Directory.GetFiles(sourceDir) + Dim strmZipOutputStream As ZipOutputStream + + strmZipOutputStream = New ZipOutputStream(File.Create(targetName)) + + REM Compression Level: 0-9 + REM 0: no(Compression) + REM 9: maximum compression + strmZipOutputStream.SetLevel(9) + + Dim strFile As String + + For Each strFile In astrFileNames + Dim strmFile As FileStream = File.OpenRead(strFile) + Dim abyBuffer(strmFile.Length - 1) As Byte + + strmFile.Read(abyBuffer, 0, abyBuffer.Length) + Dim objZipEntry As ZipEntry = New ZipEntry(strFile) + + objZipEntry.DateTime = DateTime.Now + objZipEntry.Size = strmFile.Length + strmFile.Close() + strmZipOutputStream.PutNextEntry(objZipEntry) + strmZipOutputStream.Write(abyBuffer, 0, abyBuffer.Length) + + Next + + strmZipOutputStream.Finish() + strmZipOutputStream.Close() + + MessageBox.Show("Operation complete") + End Sub End Class End Namespace diff --git a/samples/vb/minibzip2/minibzip2.vbproj b/samples/vb/minibzip2/minibzip2.vbproj index c0d601f8a..f1895d15f 100644 --- a/samples/vb/minibzip2/minibzip2.vbproj +++ b/samples/vb/minibzip2/minibzip2.vbproj @@ -37,7 +37,6 @@ - @@ -47,9 +46,14 @@ - + + Form + - + + Main.vb + Designer + diff --git a/samples/vb/minibzip2/minibzip2.vbproj.user b/samples/vb/minibzip2/minibzip2.vbproj.user index d1c29494d..718284a26 100644 --- a/samples/vb/minibzip2/minibzip2.vbproj.user +++ b/samples/vb/minibzip2/minibzip2.vbproj.user @@ -7,4 +7,7 @@ + + ProjectFiles + \ No newline at end of file diff --git a/samples/vb/viewzipfile/viewzipfile.sln b/samples/vb/viewzipfile/viewzipfile.sln index b5d41ff72..985b4f785 100644 --- a/samples/vb/viewzipfile/viewzipfile.sln +++ b/samples/vb/viewzipfile/viewzipfile.sln @@ -1,21 +1,18 @@ -Microsoft Visual Studio Solution File, Format Version 7.00 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "viewzipfile", "viewzipfile.vbproj", "{DFBFD81B-02FF-45FA-AC61-140E25CD5E6A}" + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +# SharpDevelop 2.2.0.2595 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "viewzipfile", "viewzipfile.vbproj", "{DB53264C-64AD-4B43-91A9-F5325561C77B}" EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - ConfigName.0 = Debug - ConfigName.1 = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {DFBFD81B-02FF-45FA-AC61-140E25CD5E6A}.Debug.ActiveCfg = Debug|.NET - {DFBFD81B-02FF-45FA-AC61-140E25CD5E6A}.Debug.Build.0 = Debug|.NET - {DFBFD81B-02FF-45FA-AC61-140E25CD5E6A}.Release.ActiveCfg = Release|.NET - {DFBFD81B-02FF-45FA-AC61-140E25CD5E6A}.Release.Build.0 = Release|.NET - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB53264C-64AD-4B43-91A9-F5325561C77B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB53264C-64AD-4B43-91A9-F5325561C77B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB53264C-64AD-4B43-91A9-F5325561C77B}.Release|Any CPU.Build.0 = Release|Any CPU + {DB53264C-64AD-4B43-91A9-F5325561C77B}.Release|Any CPU.ActiveCfg = Release|Any CPU EndGlobalSection EndGlobal diff --git a/samples/vb/viewzipfile/viewzipfile.vbproj b/samples/vb/viewzipfile/viewzipfile.vbproj index 2511c69f7..ae6ea9193 100644 --- a/samples/vb/viewzipfile/viewzipfile.vbproj +++ b/samples/vb/viewzipfile/viewzipfile.vbproj @@ -1,117 +1,61 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Debug + AnyCPU + 2.0 + {DB53264C-64AD-4B43-91A9-F5325561C77B} + NewProject + viewzipfile + WinExe + + + + + + + OnSuccessfulBuild + + + + + True + True + + True + + bin\ + True + + + True + True + + True + + \ + True + + + + + + + + ..\..\..\bin\ICSharpCode.SharpZipLib.dll + True + + + + + Form + + + + Main.vb + Designer + + + + + + \ No newline at end of file diff --git a/samples/vb/viewzipfile/viewzipfile.vbproj.user b/samples/vb/viewzipfile/viewzipfile.vbproj.user index e71f15bb1..718284a26 100644 --- a/samples/vb/viewzipfile/viewzipfile.vbproj.user +++ b/samples/vb/viewzipfile/viewzipfile.vbproj.user @@ -1,48 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + ProjectFiles + + \ No newline at end of file diff --git a/samples/vb/zipfiletest/Main.resx b/samples/vb/zipfiletest/Main.resx index 2876782f8..19dc0dd8b 100644 --- a/samples/vb/zipfiletest/Main.resx +++ b/samples/vb/zipfiletest/Main.resx @@ -1,75 +1,96 @@ + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + + + + + + + + + + + + + + + + + + - + + @@ -88,48 +109,12 @@ text/microsoft-resx - 1.3 + 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Assembly - - - Assembly - - - Assembly - - - Assembly - - - Assembly - - - Assembly - - - Assembly - - - Assembly - - - Assembly - - - Assembly - - - Assembly - - - Form1 - \ No newline at end of file diff --git a/samples/vb/zipfiletest/Main.vb b/samples/vb/zipfiletest/Main.vb index d331aa871..a8e0e26d5 100644 --- a/samples/vb/zipfiletest/Main.vb +++ b/samples/vb/zipfiletest/Main.vb @@ -5,190 +5,191 @@ Imports System.IO Imports System.Windows.Forms Imports ICSharpCode.SharpZipLib.Zip -Public Class MainForm - Inherits System.Windows.Forms.Form - Friend btnTest As System.Windows.Forms.Button - Friend btnBrowse As System.Windows.Forms.Button - Friend Label1 As System.Windows.Forms.Label - Friend chdrSize As System.Windows.Forms.ColumnHeader - Friend chdrName As System.Windows.Forms.ColumnHeader - Friend hdrTime As System.Windows.Forms.ColumnHeader - Friend chdrRawSize As System.Windows.Forms.ColumnHeader - Friend lvZipContents As System.Windows.Forms.ListView - Friend lblListName As System.Windows.Forms.Label - Friend hdrDate As System.Windows.Forms.ColumnHeader - Friend txtFileName As System.Windows.Forms.TextBox - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - - Public Shared Sub Main - Dim fMainForm As New MainForm - fMainForm.ShowDialog() - End Sub - - Public Sub New() - MyBase.New() - ' Must be called for initialization - Me.InitializeComponent - ' - ' TODO : Add constructor code after InitializeComponents - ' - End Sub +Public Class Form1 + Inherits System.Windows.Forms.Form + Friend WithEvents btnTest As System.Windows.Forms.Button + Friend Label1 As System.Windows.Forms.Label + Friend chdrSize As System.Windows.Forms.ColumnHeader + Friend chdrName As System.Windows.Forms.ColumnHeader + Friend hdrTime As System.Windows.Forms.ColumnHeader + Friend chdrRawSize As System.Windows.Forms.ColumnHeader + Friend lvZipContents As System.Windows.Forms.ListView + Friend lblListName As System.Windows.Forms.Label + Friend hdrDate As System.Windows.Forms.ColumnHeader + Friend WithEvents btnBrowse As System.Windows.Forms.Button + Friend txtFileName As System.Windows.Forms.TextBox - Private Sub InitializeComponent() - Me.txtFileName = New System.Windows.Forms.TextBox - Me.hdrDate = New System.Windows.Forms.ColumnHeader - Me.lblListName = New System.Windows.Forms.Label - Me.lvZipContents = New System.Windows.Forms.ListView - Me.chdrRawSize = New System.Windows.Forms.ColumnHeader - Me.hdrTime = New System.Windows.Forms.ColumnHeader - Me.chdrName = New System.Windows.Forms.ColumnHeader - Me.chdrSize = New System.Windows.Forms.ColumnHeader - Me.Label1 = New System.Windows.Forms.Label - Me.btnBrowse = New System.Windows.Forms.Button - Me.btnTest = New System.Windows.Forms.Button - Me.SuspendLayout - ' - 'txtFileName - ' - Me.txtFileName.Location = New System.Drawing.Point(117, 23) - Me.txtFileName.Name = "txtFileName" - Me.txtFileName.Size = New System.Drawing.Size(197, 21) - Me.txtFileName.TabIndex = 0 - Me.txtFileName.Text = "" - ' - 'hdrDate - ' - Me.hdrDate.Text = "Date" - Me.hdrDate.Width = 71 - ' - 'lblListName - ' - Me.lblListName.Location = New System.Drawing.Point(16, 53) - Me.lblListName.Name = "lblListName" - Me.lblListName.Size = New System.Drawing.Size(256, 22) - Me.lblListName.TabIndex = 5 - Me.lblListName.Text = "(no file)" - ' - 'lvZipContents - ' - Me.lvZipContents.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles) - Me.lvZipContents.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.chdrName, Me.chdrRawSize, Me.chdrSize, Me.hdrDate, Me.hdrTime}) - Me.lvZipContents.FullRowSelect = true - Me.lvZipContents.GridLines = true - Me.lvZipContents.Location = New System.Drawing.Point(8, 80) - Me.lvZipContents.Name = "lvZipContents" - Me.lvZipContents.Size = New System.Drawing.Size(440, 232) - Me.lvZipContents.Sorting = System.Windows.Forms.SortOrder.Ascending - Me.lvZipContents.TabIndex = 6 - Me.lvZipContents.View = System.Windows.Forms.View.Details - ' - 'chdrRawSize - ' - Me.chdrRawSize.Text = "RawSize" - Me.chdrRawSize.Width = 67 - ' - 'hdrTime - ' - Me.hdrTime.Text = "Time" - Me.hdrTime.Width = 58 - ' - 'chdrName - ' - Me.chdrName.Text = "Name" - Me.chdrName.Width = 127 - ' - 'chdrSize - ' - Me.chdrSize.Text = "Size" - Me.chdrSize.Width = 52 - ' - 'Label1 - ' - Me.Label1.Location = New System.Drawing.Point(16, 23) - Me.Label1.Name = "Label1" - Me.Label1.Size = New System.Drawing.Size(91, 21) - Me.Label1.TabIndex = 3 - Me.Label1.Text = "Zip File Name:" - ' - 'btnBrowse - ' - Me.btnBrowse.Location = New System.Drawing.Point(320, 23) - Me.btnBrowse.Name = "btnBrowse" - Me.btnBrowse.Size = New System.Drawing.Size(20, 21) - Me.btnBrowse.TabIndex = 7 - Me.btnBrowse.Text = "..." - AddHandler Me.btnBrowse.Click, AddressOf Me.btnBrowseClick - ' - 'btnTest - ' - Me.btnTest.Location = New System.Drawing.Point(344, 23) - Me.btnTest.Name = "btnTest" - Me.btnTest.Size = New System.Drawing.Size(68, 21) - Me.btnTest.TabIndex = 1 - Me.btnTest.Text = "View" - AddHandler Me.btnTest.Click, AddressOf Me.btnTestClick - ' - 'MainForm - ' - Me.AutoScaleBaseSize = New System.Drawing.Size(5, 14) - Me.ClientSize = New System.Drawing.Size(456, 334) - Me.Controls.Add(Me.btnBrowse) - Me.Controls.Add(Me.lvZipContents) - Me.Controls.Add(Me.lblListName) - Me.Controls.Add(Me.Label1) - Me.Controls.Add(Me.txtFileName) - Me.Controls.Add(Me.btnTest) - Me.Name = "MainForm" - Me.Text = "Test Zip File" - Me.ResumeLayout(false) - End Sub + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. - Public Sub btnTestClick(ByVal Sender As Object, ByVal EA As EventArgs) - Dim objEntry As ZipEntry - Dim dtStamp As DateTime - Dim objItem As ListViewItem - Dim zFile As ZipFile + Public Shared Sub Main() + Dim fMainForm As New Form1 + fMainForm.ShowDialog() + End Sub - ' Really simple error handling here (catch all) - Try - zFile = New ZipFile(txtFileName.Text) - Catch Ex As System.Exception - MessageBox.Show(Ex.Message) - Exit Sub - End Try + Public Sub New() + MyBase.New() + ' Must be called for initialization + Me.InitializeComponent() + ' + ' TODO : Add constructor code after InitializeComponents + ' + End Sub - lblListName.Text = "Listing of : " + zFile.Name.ToString - lvZipContents.BeginUpdate() - lvZipContents.Items.Clear() + Private Sub InitializeComponent() + Me.txtFileName = New System.Windows.Forms.TextBox + Me.hdrDate = New System.Windows.Forms.ColumnHeader + Me.lblListName = New System.Windows.Forms.Label + Me.lvZipContents = New System.Windows.Forms.ListView + Me.chdrName = New System.Windows.Forms.ColumnHeader + Me.chdrRawSize = New System.Windows.Forms.ColumnHeader + Me.chdrSize = New System.Windows.Forms.ColumnHeader + Me.hdrTime = New System.Windows.Forms.ColumnHeader + Me.Label1 = New System.Windows.Forms.Label + Me.btnTest = New System.Windows.Forms.Button + Me.btnBrowse = New System.Windows.Forms.Button + Me.SuspendLayout() + ' + 'txtFileName + ' + Me.txtFileName.Location = New System.Drawing.Point(117, 21) + Me.txtFileName.Name = "txtFileName" + Me.txtFileName.Size = New System.Drawing.Size(197, 20) + Me.txtFileName.TabIndex = 0 + ' + 'hdrDate + ' + Me.hdrDate.Text = "Date" + Me.hdrDate.Width = 71 + ' + 'lblListName + ' + Me.lblListName.Location = New System.Drawing.Point(16, 49) + Me.lblListName.Name = "lblListName" + Me.lblListName.Size = New System.Drawing.Size(256, 21) + Me.lblListName.TabIndex = 5 + Me.lblListName.Text = "(no file)" + ' + 'lvZipContents + ' + Me.lvZipContents.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lvZipContents.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.chdrName, Me.chdrRawSize, Me.chdrSize, Me.hdrDate, Me.hdrTime}) + Me.lvZipContents.FullRowSelect = True + Me.lvZipContents.GridLines = True + Me.lvZipContents.Location = New System.Drawing.Point(8, 74) + Me.lvZipContents.Name = "lvZipContents" + Me.lvZipContents.Size = New System.Drawing.Size(440, 240) + Me.lvZipContents.Sorting = System.Windows.Forms.SortOrder.Ascending + Me.lvZipContents.TabIndex = 6 + Me.lvZipContents.UseCompatibleStateImageBehavior = False + Me.lvZipContents.View = System.Windows.Forms.View.Details + ' + 'chdrName + ' + Me.chdrName.Text = "Name" + Me.chdrName.Width = 127 + ' + 'chdrRawSize + ' + Me.chdrRawSize.Text = "RawSize" + Me.chdrRawSize.Width = 67 + ' + 'chdrSize + ' + Me.chdrSize.Text = "Size" + Me.chdrSize.Width = 52 + ' + 'hdrTime + ' + Me.hdrTime.Text = "Time" + Me.hdrTime.Width = 58 + ' + 'Label1 + ' + Me.Label1.Location = New System.Drawing.Point(16, 21) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(91, 20) + Me.Label1.TabIndex = 3 + Me.Label1.Text = "Zip File Name:" + ' + 'btnTest + ' + Me.btnTest.Location = New System.Drawing.Point(352, 24) + Me.btnTest.Name = "btnTest" + Me.btnTest.Size = New System.Drawing.Size(68, 20) + Me.btnTest.TabIndex = 1 + Me.btnTest.Text = "View" + ' + 'btnBrowse + ' + Me.btnBrowse.Location = New System.Drawing.Point(320, 21) + Me.btnBrowse.Name = "btnBrowse" + Me.btnBrowse.Size = New System.Drawing.Size(26, 23) + Me.btnBrowse.TabIndex = 7 + Me.btnBrowse.Text = "..." + Me.btnBrowse.UseVisualStyleBackColor = True + ' + 'Form1 + ' + Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) + Me.ClientSize = New System.Drawing.Size(456, 334) + Me.Controls.Add(Me.btnBrowse) + Me.Controls.Add(Me.lvZipContents) + Me.Controls.Add(Me.lblListName) + Me.Controls.Add(Me.Label1) + Me.Controls.Add(Me.txtFileName) + Me.Controls.Add(Me.btnTest) + Me.Name = "Form1" + Me.Text = "Test Zip File" + Me.ResumeLayout(False) + Me.PerformLayout() - For Each objEntry In zFile - objItem = New ListViewItem(objEntry.Name) - dtStamp = objEntry.DateTime - objItem.SubItems.Add(objEntry.Size.ToString) - objItem.SubItems.Add(objEntry.CompressedSize.ToString) - objItem.SubItems.Add(dtStamp.ToString("dd-MM-yy")) - objItem.SubItems.Add(dtStamp.ToString("t")) - objItem.SubItems.Add(objEntry.Name.ToString) - lvZipContents.Items.Add(objItem) - Next + End Sub - lvZipContents.EndUpdate() - End Sub + Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click + Dim objEntry As ZipEntry + Dim dtStamp As DateTime + Dim objItem As ListViewItem + Dim zFile As ZipFile - Private Sub btnBrowseClick(ByVal sender As System.Object, ByVal e As System.EventArgs) - Dim ofn As New OpenFileDialog() + ' Really simple error handling here (catch all) + Try + zFile = New ZipFile(txtFileName.Text) + Catch Ex As System.Exception + MessageBox.Show(Ex.Message) + Exit Sub + End Try - ofn.InitialDirectory = "c:\" - ofn.Filter = "Zip Files (*.zip)|*.zip|All files (*.*)|*.*" + lblListName.Text = "Listing of : " + zFile.Name.ToString + lvZipContents.BeginUpdate() + lvZipContents.Items.Clear() - If (ofn.ShowDialog() = Windows.Forms.DialogResult.OK) Then - txtFileName.Text = ofn.FileName - End If - End Sub + For Each objEntry In zFile + objItem = New ListViewItem(objEntry.Name) + dtStamp = objEntry.DateTime + objItem.SubItems.Add(objEntry.Size.ToString) + objItem.SubItems.Add(objEntry.CompressedSize.ToString) + objItem.SubItems.Add(dtStamp.ToString("dd-MM-yy")) + objItem.SubItems.Add(dtStamp.ToString("t")) + objItem.SubItems.Add(objEntry.Name.ToString) + lvZipContents.Items.Add(objItem) + Next + + lvZipContents.EndUpdate() + End Sub + + Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click + Dim ofn As New OpenFileDialog() + + ofn.InitialDirectory = "c:\" + ofn.Filter = "Zip Files (*.zip)|*.zip|All files (*.*)|*.*" + + If (ofn.ShowDialog() = Windows.Forms.DialogResult.OK) Then + txtFileName.Text = ofn.FileName + End If + End Sub End Class diff --git a/samples/vb/zipfiletest/zipfiletest.sln b/samples/vb/zipfiletest/zipfiletest.sln index 6a9280f12..03bbfb467 100644 --- a/samples/vb/zipfiletest/zipfiletest.sln +++ b/samples/vb/zipfiletest/zipfiletest.sln @@ -1,21 +1,18 @@ -Microsoft Visual Studio Solution File, Format Version 7.00 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "zipfiletest", "zipfiletest.vbproj", "{A02B0E6F-BE9B-4E7E-9C9D-123FA1D20887}" + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +# SharpDevelop 2.2.0.2595 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "zipfiletest", "zipfiletest.vbproj", "{54057AFD-35E2-48C3-8419-45D57C351C1F}" EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - ConfigName.0 = Debug - ConfigName.1 = Release + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {A02B0E6F-BE9B-4E7E-9C9D-123FA1D20887}.Debug.ActiveCfg = Debug|.NET - {A02B0E6F-BE9B-4E7E-9C9D-123FA1D20887}.Debug.Build.0 = Debug|.NET - {A02B0E6F-BE9B-4E7E-9C9D-123FA1D20887}.Release.ActiveCfg = Release|.NET - {A02B0E6F-BE9B-4E7E-9C9D-123FA1D20887}.Release.Build.0 = Release|.NET - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {54057AFD-35E2-48C3-8419-45D57C351C1F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54057AFD-35E2-48C3-8419-45D57C351C1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54057AFD-35E2-48C3-8419-45D57C351C1F}.Release|Any CPU.Build.0 = Release|Any CPU + {54057AFD-35E2-48C3-8419-45D57C351C1F}.Release|Any CPU.ActiveCfg = Release|Any CPU EndGlobalSection EndGlobal diff --git a/samples/vb/zipfiletest/zipfiletest.vbproj b/samples/vb/zipfiletest/zipfiletest.vbproj index b3cb842fe..1498697c9 100644 --- a/samples/vb/zipfiletest/zipfiletest.vbproj +++ b/samples/vb/zipfiletest/zipfiletest.vbproj @@ -1,117 +1,69 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Debug + AnyCPU + 2.0 + {54057AFD-35E2-48C3-8419-45D57C351C1F} + NewProject + zipfiletest + WinExe + + 4 + + + + OnSuccessfulBuild + + + False + On + Off + Binary + + + true + True + + True + bin\ + true + Full + + + True + True + + True + + \ + True + + + False + Auto + 4194304 + AnyCPU + + + + + + + ..\..\..\bin\ICSharpCode.SharpZipLib.dll + True + + + + + + Form + + + Main.vb + Designer + + + + + + \ No newline at end of file diff --git a/samples/vb/zipfiletest/zipfiletest.vbproj.user b/samples/vb/zipfiletest/zipfiletest.vbproj.user index 472614600..718284a26 100644 --- a/samples/vb/zipfiletest/zipfiletest.vbproj.user +++ b/samples/vb/zipfiletest/zipfiletest.vbproj.user @@ -1,48 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + ProjectFiles + + \ No newline at end of file diff --git a/src/AssemblyInfo.cs b/src/AssemblyInfo.cs index 5d83effef..1e736dd21 100644 --- a/src/AssemblyInfo.cs +++ b/src/AssemblyInfo.cs @@ -73,7 +73,7 @@ [assembly: AssemblyCopyright("Copyright 2001-2007 Mike Krueger, John Reilly")] [assembly: AssemblyTrademark("Copyright 2001-2007 Mike Krueger, John Reilly")] -[assembly: AssemblyVersion("0.85.3.346")] +[assembly: AssemblyVersion("0.85.3.364")] [assembly: AssemblyInformationalVersionAttribute("0.85.3")] diff --git a/tests/AssemblyInfo.cs b/tests/AssemblyInfo.cs index e25c70621..7fb7d7b72 100644 --- a/tests/AssemblyInfo.cs +++ b/tests/AssemblyInfo.cs @@ -23,7 +23,7 @@ // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("0.85.3.346")] +[assembly: AssemblyVersion("0.85.3.364")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing.