資源簡介
vs2005在線壓縮、解壓縮文件源碼,簡單實用

代碼片段和文件信息
using?System;
using?System.Data;
using?System.Configuration;
using?System.Collections;
using?System.Web;
using?System.Web.Security;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Web.UI.WebControls.WebParts;
using?System.Web.UI.HtmlControls;
using?System.IO;
using?Microsoft.Win32;
using?System.Runtime.InteropServices;
using?System.Diagnostics;
//該源碼下載自www.51aspx.com(51aspx.com)
namespace?TreeRar
{
????public?partial?class?_Default?:?System.Web.UI.Page
????{
????????protected?void?Page_Load(object?sender?EventArgs?e)
????????{
????????????//遞歸展示文件目錄
????????????string[]?dir?=?Directory.GetDirectories(Server.MapPath(“\\“));
????????????Response.Write(“yle=\“color=#FFFFFF\“>目錄列表: “);
????????????for?(int?i?=?0;?i?????????????{
????????????????string?href?=?dir[i];
????????????????href?=?“http://“+Request.Url.Authority.ToString()?+?href.Substring(href.LastIndexOf(“\\“));
????????????????Response.Write(“mouseout=\“this.style.backgroundColor=‘#ffffff‘\“???onmouseover=\“this.style.backgroundColor=‘#cccccc‘\“> “?+?dir[i]?+?“ 打開 “);
????????????}
????????????Response.Write(“
“);
????????????lbTree.Text?=?Server.MapPath(“\\“);
????????????//???在此處放置用戶代碼以初始化頁面???
????????}
????????//得到當前IP
????????private?string?GetIP()
????????{
????????????string[]?IP_Ary;
????????????string?strIP?strIP_list;
????????????strIP_list?=?Request.ServerVariables[“HTTP_X_FORWARDED_FOR“];
????????????if?(strIP_list?!=?null?&&?strIP_list?!=?““)
????????????{
????????????????strIP_list?=?strIP_list.Replace(“‘“?““);
????????????????if?(strIP_list.IndexOf(““)?>=?0)
????????????????{
????????????????????IP_Ary?=?strIP_list.Split(‘‘);
????????????????????strIP?=?IP_Ary[0];
????????????????}
????????????????else
????????????????{
????????????????????strIP?=?strIP_list;
????????????????}
????????????}
????????????else
????????????{
????????????????strIP?=?““;
????????????}
????????????if?(strIP?==?““)
????????????{
????????????????strIP?=?Request.ServerVariables[“REMOTE_ADDR“];
????????????????strIP?=?strIP.Replace(“‘“?““);
????????????}
????????????return?strIP;
????????}
????????protected?void?btnZip_Click(object?sender?EventArgs?e)
????????{
??????????//壓縮
????????String?my51aspxRar;
????????RegistryKey?my51aspxReg;
????????object?my51aspxObj;
????????String?my51aspxInfo;
????????ProcessStartInfo?my51aspxStartInfo;
????????Process?my51aspxProcess;
????????try
????????{
????????????my51aspxReg?=?Registry.ClassesRoot.OpenSubKey(@“Applications\WinRAR.exe\Shell\Open\Command“);
????????????my51aspxObj?=?my51aspxReg.GetValue(““);
????????????my51aspxRar?=?my51aspxObj.ToString();
????????????my51aspxReg.Close();
????????????my51aspxRar?=?my51aspxRar.S
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄??????????0??2007-09-06?10:43??unRar
?????文件???????1722??2007-09-06?10:38??51aspx源碼必讀.txt
?????文件????????720??2007-09-06?09:56??Default.aspx
?????文件???????5248??2007-09-06?10:39??Default.aspx.cs
?????文件???????1910??2007-09-06?09:49??Default.aspx.designer.cs
?????文件???????3365??2007-09-06?09:49??TreeRar.csproj
?????文件???????1150??2007-09-06?09:49??TreeRar.csproj.user
?????文件???????1052??2007-09-06?08:51??TreeRar.sln
?????文件???????1263??2007-09-06?08:50??Web.config
?????文件????????125??2007-03-27?14:33??最新Asp.Net源碼下載.url
?????文件??????20480??2007-09-06?10:36??bin\TreeRar.dll
?????文件??????15872??2007-09-06?10:36??bin\TreeRar.pdb
?????目錄??????????0??2007-09-06?08:55??bin
?????目錄??????????0??2007-09-06?10:35??obj\Debug\Refactor
?????目錄??????????0??2007-09-06?08:50??obj\Debug\TempPE
?????文件??????20480??2007-09-06?10:36??obj\Debug\TreeRar.dll
?????文件??????15872??2007-09-06?10:36??obj\Debug\TreeRar.pdb
?????目錄??????????0??2007-09-06?10:36??obj\Debug
?????文件????????122??2007-09-06?10:36??obj\TreeRar.csproj.FileList.txt
?????目錄??????????0??2007-09-06?08:52??obj
?????文件???????1397??2007-09-06?08:50??Properties\AssemblyInfo.cs
?????目錄??????????0??2007-09-06?08:50??Properties
?????文件???????4945??2007-07-18?09:38??rar\51aspx.gif
?????文件????????152??2007-09-06?10:39??rar\51aspx.rar
?????文件?????????38??2007-09-06?10:27??rar\51aspx.txt
?????目錄??????????0??2007-09-06?10:43??rar
-----------?---------??----------?-----??----
????????????????95913????????????????????26
評論
共有 條評論