摘要:
public static string ToHtmlColor(string colorName) { try { if (colorName.StartsWith("#")) colorName = colorName.Replace("#", string.Empty); int v = int.Parse(colorName, System.Globalization.NumberStyles.HexNumber); ... 阅读全文
摘要:
public static class BrowserHelper { private const string IE = "IE"; private const string Version6 = "6"; private const string Version7 = "7"; private const string Version8 = "8"; private const string Version9 = "9"; public static bool IsIE6() { ... 阅读全文
摘要:
public static class Compressor { public static byte[] Compress(byte[] data) { using (MemoryStream output = new MemoryStream()) { using (GZipStream gzip = new GZipStream(output, CompressionMode.Compress, true)) ... 阅读全文
摘要:
class ServicePinger { private static readonly ILog log = LogManager.GetLogger(typeof(ServicePinger)); public ServicePinger(string siteName, string siteUrl, string serviceUrl) { if (siteName == null) throw new ArgumentException("siteName can't be null... 阅读全文
摘要:
//// ------------------------- // JavaScript的Cookies函数库// ------------------------- // 保存Cookie function saveCookie(name, value, expires, path, domain, secure) { var strCookie = name + "=" + value; if (expires) { // 计算Cookie的期限, 参数为天数 var curTime = new Date()... 阅读全文