C#反编译微软MSDN2003的帮助文档,并将反编译结果保存到一个SQLSERVER数据库中__教程 |
|
日期:2007-5-20 0:37:44 人气:169 [大 中 小] |
|
|
|
return ;
strOutDir = strOutDir.Trim(); if( System.IO.Directory.Exists( strOutDir ) == false) System.IO.Directory.CreateDirectory( strOutDir );
string strTempPath = System.IO.Path.Combine( strOutDir , "temp"); if( System.IO.Directory.Exists( strTempPath ) == false) System.IO.Directory.CreateDirectory( strTempPath );
bolCancel = false; bolPause = false; InitDB(); using(System.Data.SqlClient.SqlCommand myCmd = MainConn.CreateCommand()) { myCmd.CommandText = "Delete From MSDNFile"; myCmd.ExecuteNonQuery(); myCmd.CommandText = "Delete From MSDNFileList"; myCmd.ExecuteNonQuery(); } int DBCount = 1 ; long FileSizeCount = 0 ; long TotalFileSize = 0 ; int FileCount = 0 ; string[] strFileNames = System.IO.Directory.GetFiles( strMSDNDir , "*.hxs"); this.InvokeSetLabelText( this.lblDB , "当前数据库:" + CurrentDBName ); InvokeSetProgress( this.MainProgress , strFileNames.Length , 0 ); long HXSFileSize = 0 ; // 计算所有要处理的文件的长度 foreach( string strFileName in strFileNames) { System.IO.FileInfo myInfo = new System.IO.FileInfo( strFileName ); HXSFileSize += myInfo.Length ; } long HXFileSizeCount = 0 ; // 计算单个数据库所能保存的数据大小,在此设置为1000MB int DBMaxSize = 1000 * 1024 * 1024 ; // 分别处理单个HXS文档 for(int HXSFileCount = 0 ; HXSFileCount < strFileNames.Length ; HXSFileCount ++ ) { if( bolCancel ) break; |
|
出处:本站原创 作者:佚名 |
|
|