写的不错,打赏一下
摘要: /// /// 正则表达式相关方法集合 /// public static class RegularHelper { private const string m_NumberPattm = @"^[-+]?(0{1}|(([1-9]){1}[0-9]{0,6}))?$"; private const string m_Num... 阅读全文
posted @ 2014-12-24 21:56 不负春光,努力生长 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2014-12-24 21:55 不负春光,努力生长 阅读(304) 评论(0) 推荐(0) 编辑
摘要: public static class EncryptionHelper { #region const /// /// 默认使用的适合于DES,RC2算法的Key /// private const string m_ShortDefaultKey = "Nesc"; /// ... 阅读全文
posted @ 2014-12-24 21:53 不负春光,努力生长 阅读(322) 评论(0) 推荐(0) 编辑
摘要: private static XmlWriterSettings GetSettings() { XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.NewLineChars = "\n... 阅读全文
posted @ 2014-12-24 21:52 不负春光,努力生长 阅读(267) 评论(0) 推荐(0) 编辑
摘要: public static class EnumHelper { #region get /// /// 获得枚举类型所包含的全部项的列表 /// /// 枚举的类型 /// public static List GetEnumItems(Type enumTyp... 阅读全文
posted @ 2014-12-24 21:50 不负春光,努力生长 阅读(416) 评论(0) 推荐(0) 编辑
摘要: public static T LoadFromXml(string fileName) { FileStream fs = null; try { XmlSerializer serializer = new XmlSerializer(typeof(T)); ... 阅读全文
posted @ 2014-12-24 21:49 不负春光,努力生长 阅读(308) 评论(0) 推荐(0) 编辑
摘要: public static class ExtendHelper { /// /// 检查当前字符串是否符合某种格式 /// /// /// /// public static bool IsMatch(this string thisValue, string re... 阅读全文
posted @ 2014-12-24 21:44 不负春光,努力生长 阅读(227) 评论(0) 推荐(0) 编辑
摘要: public static ObservableCollection Transform(List target) where F : new() { ObservableCollection source = new ObservableCollection(); for (int i ... 阅读全文
posted @ 2014-12-24 21:42 不负春光,努力生长 阅读(196) 评论(0) 推荐(0) 编辑
摘要: public class ConfigInfo { public static ScriptsHelper Scripts { get { return new ScriptsHelper(); } } public static ParametersHelper Parameters ... 阅读全文
posted @ 2014-12-24 21:41 不负春光,努力生长 阅读(322) 评论(0) 推荐(0) 编辑
摘要: public static void TraceLog(string message, string logFileName) { string tmppath = AppDomain.CurrentDomain.BaseDirectory + "\\Log\\"; if (!Directory.Exists(tmppath)) ... 阅读全文
posted @ 2014-12-24 21:40 不负春光,努力生长 阅读(225) 评论(0) 推荐(0) 编辑
摘要: private static DateTime BaseTime = new DateTime(1970, 1, 1); 将unixtime转换为.NET的DateTime public static DateTime FromUnixTime(long timeStamp) { return new DateTime((timeStamp)... 阅读全文
posted @ 2014-12-24 21:38 不负春光,努力生长 阅读(391) 评论(0) 推荐(0) 编辑
摘要: public static bool StartBy(this string thisValue, params string[] startBy) { foreach (string item in startBy) { if (thisValue.StartsWith(item)) ... 阅读全文
posted @ 2014-12-24 21:36 不负春光,努力生长 阅读(222) 评论(0) 推荐(0) 编辑