資源簡介
c#文件壓縮,代碼可以修改使用
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?ICSharpCode.SharpZipLib.Zip;
using?ICSharpCode.SharpZipLib.Checksums;
using?System.IO;
namespace?Zip
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????public?void?ZipFilenew(string?strFileFolder?string?strZip)
????????{
????????????if?(strFileFolder[strFileFolder.Length?-?1]?!=?Path.DirectorySeparatorChar)
????????????????strFileFolder?+=?Path.DirectorySeparatorChar;
????????????ZipOutputStream?s?=?new?ZipOutputStream(File.Create(strZip));
????????????s.SetLevel(6);?//?0?-?store?only?to?9?-?means?best?compression
?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????898??2008-05-26?22:04??Zip_SharpZip和WinRAR\Zip.sln
????..A..H.?????12288??2008-05-28?12:23??Zip_SharpZip和WinRAR\Zip.suo
?????文件?????188416??2007-09-07?23:48??Zip_SharpZip和WinRAR\Zip\ICSharpCode.SharpZipLib.dll
?????文件????????462??2008-05-26?22:04??Zip_SharpZip和WinRAR\Zip\Program.cs
?????文件???????3486??2008-05-27?00:25??Zip_SharpZip和WinRAR\Zip\Zip.csproj
?????文件???????4723??2008-05-28?11:53??Zip_SharpZip和WinRAR\Zip\Form1.Designer.cs
?????文件???????5814??2008-05-28?11:53??Zip_SharpZip和WinRAR\Zip\Form1.resx
?????文件???????3744??2008-05-28?12:01??Zip_SharpZip和WinRAR\Zip\Form1.cs
?????文件???????1178??2008-05-26?22:03??Zip_SharpZip和WinRAR\Zip\Properties\AssemblyInfo.cs
?????文件???????2862??2008-05-26?22:03??Zip_SharpZip和WinRAR\Zip\Properties\Resources.Designer.cs
?????文件???????5612??2008-05-26?22:03??Zip_SharpZip和WinRAR\Zip\Properties\Resources.resx
?????文件???????1088??2008-05-26?22:03??Zip_SharpZip和WinRAR\Zip\Properties\Settings.Designer.cs
?????文件????????249??2008-05-26?22:03??Zip_SharpZip和WinRAR\Zip\Properties\Settings.settings
?????目錄??????????0??2008-05-26?22:04??Zip_SharpZip和WinRAR\Zip\Properties
?????文件???????3313??2008-05-27?00:25??Zip_SharpZip和WinRAR\Zip\obj\Debug\ResolveAssemblyReference.cache
?????目錄??????????0??2008-05-26?22:04??Zip_SharpZip和WinRAR\Zip\obj\Debug\TempPE
?????文件??????20480??2008-05-28?12:01??Zip_SharpZip和WinRAR\Zip\obj\Debug\Zip.exe
?????文件????????180??2008-05-28?11:54??Zip_SharpZip和WinRAR\Zip\obj\Debug\Zip.Form1.resources
?????文件??????30208??2008-05-28?12:01??Zip_SharpZip和WinRAR\Zip\obj\Debug\Zip.pdb
?????文件????????180??2008-05-27?00:25??Zip_SharpZip和WinRAR\Zip\obj\Debug\Zip.Properties.Resources.resources
?????文件????????842??2008-05-28?11:54??Zip_SharpZip和WinRAR\Zip\obj\Debug\Zip.csproj.GenerateResource.Cache
?????目錄??????????0??2008-05-27?00:42??Zip_SharpZip和WinRAR\Zip\obj\Debug
?????文件????????828??2008-05-28?12:03??Zip_SharpZip和WinRAR\Zip\obj\Zip.csproj.FileListAbsolute.txt
?????目錄??????????0??2008-05-27?00:26??Zip_SharpZip和WinRAR\Zip\obj
?????文件?????188416??2007-09-07?23:48??Zip_SharpZip和WinRAR\Zip\bin\Debug\ICSharpCode.SharpZipLib.dll
?????文件??????20480??2008-05-28?12:01??Zip_SharpZip和WinRAR\Zip\bin\Debug\Zip.exe
?????目錄??????????0??2008-05-27?00:29??Zip_SharpZip和WinRAR\Zip\bin\Debug
?????目錄??????????0??2008-05-28?13:17??Zip_SharpZip和WinRAR\Zip\bin
?????目錄??????????0??2008-05-28?13:17??Zip_SharpZip和WinRAR\Zip
?????目錄??????????0??2008-05-28?13:17??Zip_SharpZip和WinRAR
............此處省略3個文件信息
- 上一篇:winform 固定資產管理系統(三層架構)
- 下一篇:C# 圖書管理系統
評論
共有 條評論