大家知道,開發專案除了資料訪問層很重要外,就是common了,這裡就提供了強大且實用的工具。
【c#公共幫助類】 convert幫助類
image類:
usingsystem;
using
system.collections.generic;
using
system.text;
using
system.io;
using
system.drawing.imaging;
using
system.drawing;
using
system.web;
namespace
common
try
catch
}#endregion
#region 縮放
//////固定大小縮放
/// ///
原始檔相對位址
///目標檔案相對位址
///目標檔案寬
///目標檔案高
///檔案格式
public
static
bool changeimagesize(string orifilename, string desiredfilename, int intwidth, int
intheight, imageformat imageformat)
catch
}private
static
bool
imageabort()
#endregion
#region 文字水印
//////文字水印
/// ///
水印文字
///原物理檔名
///生成物理檔名
public
static
bool imagewatertext(string wtext,string source, string
target)
catch
(exception)
finally
return
resflag;
}#endregion
#region 水印
//////在上生成水印
/// ///
原伺服器路徑
///生成的帶水印的路徑
///水印路徑
public
static
bool imagewaterpic(string source, string target, string
waterpicsource)
catch
(exception)
finally
return
resflag;
}#endregion
//////
路徑轉換**換成絕對路徑)
/// ///
///private
static
string webpathtran(string
path)
catch}}
}
C 公共類 快取幫助類 (備忘)
using system using system.collections.generic using system.text using system.threading namespace librarycommon endregion region work method static voi...
C 公共幫助類 分頁邏輯處理類
分頁邏輯處理類 pagecollection.cs 1 using system 2using system.collections.generic 3using system.linq 4using system.text 56 namespace common717 18 當前頁面 19 20p...
C 安全幫助類
安全類 public class safecommon bin b blike b s script b s img b bexec b union.select update.set insert s into.values select delete from create alter drop...