12 2014 档案
摘要:/// /// 正则表达式相关方法集合 /// public static class RegularHelper { private const string m_NumberPattm = @"^[-+]?(0{1}|(([1-9]){1}[0-9]{0,6}))?$"; private const string m_Num...
阅读全文
摘要:internal class EncryptTransform { //private const int c_MaxLengthOf_IV_DES = 4; //private const int c_MaxLengthOf_IV_RC2 = 4; //private const int c_MaxLengthOf_IV_RIJNDAEL...
阅读全文
摘要:public static class EncryptionHelper { #region const /// /// 默认使用的适合于DES,RC2算法的Key /// private const string m_ShortDefaultKey = "Nesc"; /// ...
阅读全文
摘要:private static XmlWriterSettings GetSettings() { XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.NewLineChars = "\n...
阅读全文
摘要:public static class EnumHelper { #region get /// /// 获得枚举类型所包含的全部项的列表 /// /// 枚举的类型 /// public static List GetEnumItems(Type enumTyp...
阅读全文
摘要:public static T LoadFromXml(string fileName) { FileStream fs = null; try { XmlSerializer serializer = new XmlSerializer(typeof(T)); ...
阅读全文
摘要:public static class ExtendHelper { /// /// 检查当前字符串是否符合某种格式 /// /// /// /// public static bool IsMatch(this string thisValue, string re...
阅读全文
摘要:public static ObservableCollection Transform(List target) where F : new() { ObservableCollection source = new ObservableCollection(); for (int i ...
阅读全文
摘要:public class ConfigInfo { public static ScriptsHelper Scripts { get { return new ScriptsHelper(); } } public static ParametersHelper Parameters ...
阅读全文
摘要:public static void TraceLog(string message, string logFileName) { string tmppath = AppDomain.CurrentDomain.BaseDirectory + "\\Log\\"; if (!Directory.Exists(tmppath)) ...
阅读全文
摘要:private static DateTime BaseTime = new DateTime(1970, 1, 1); 将unixtime转换为.NET的DateTime public static DateTime FromUnixTime(long timeStamp) { return new DateTime((timeStamp)...
阅读全文
摘要:public static bool StartBy(this string thisValue, params string[] startBy) { foreach (string item in startBy) { if (thisValue.StartsWith(item)) ...
阅读全文