随笔分类 -  Tools

摘要:public static class ExtendHelper { /// /// 检查当前字符串是否符合某种格式 /// /// /// /// public static bool IsMatch(this string thisValue, string re... 阅读全文
posted @ 2014-12-24 21:44 不负春光,努力生长 阅读(239) 评论(0) 推荐(0)
摘要:public static ObservableCollection Transform(List target) where F : new() { ObservableCollection source = new ObservableCollection(); for (int i ... 阅读全文
posted @ 2014-12-24 21:42 不负春光,努力生长 阅读(203) 评论(0) 推荐(0)
摘要:public class ConfigInfo { public static ScriptsHelper Scripts { get { return new ScriptsHelper(); } } public static ParametersHelper Parameters ... 阅读全文
posted @ 2014-12-24 21:41 不负春光,努力生长 阅读(333) 评论(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 不负春光,努力生长 阅读(231) 评论(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 不负春光,努力生长 阅读(403) 评论(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 不负春光,努力生长 阅读(229) 评论(0) 推荐(0)
摘要:static void BuildStringOfRow(StringBuilder strBuilder, List lstFields, string strFormat) { switch (strFormat) { case "XLS": strBuil... 阅读全文
posted @ 2014-10-21 10:20 不负春光,努力生长 阅读(340) 评论(0) 推荐(0)
摘要:EXEC sp_MSforeachdb 'use ? ; IF EXISTS(SELECT top 1 1 FROM sys.syscomments WHERE text LIKE ''%test%'') SELECT ''?'' as dbname,object_name(id) as objec 阅读全文
posted @ 2014-10-08 17:24 不负春光,努力生长 阅读(198) 评论(0) 推荐(0)
摘要:添加COM组件引用:Microsoft Speech object library 阅读全文
posted @ 2014-09-29 14:58 不负春光,努力生长 阅读(581) 评论(0) 推荐(0)
摘要:public class ConfigInfo { public static ParametersHelper Parameters { get { return new ParametersHelper(); } } public class ParametersHelper {... 阅读全文
posted @ 2014-09-27 16:12 不负春光,努力生长 阅读(454) 评论(0) 推荐(0)
摘要:1. 定义抽象方法 public abstract class BaseProcesser { public abstract void GetCustomerReportCardDetailInfo(CustomerReportCardRequest request, ReportCardResu 阅读全文
posted @ 2014-09-26 15:31 不负春光,努力生长 阅读(350) 评论(0) 推荐(0)
摘要:private static object s_lock = new object(); public static void TraceLog(string message, string logFileName, string logPath = null) { string tmppath = string.Empty; ... 阅读全文
posted @ 2014-09-26 15:25 不负春光,努力生长 阅读(392) 评论(0) 推荐(0)
摘要:public class SerializeHelper { public static string XmlSerialize(List obj) { XmlSerializer serializer = new XmlSerializer(); return serializer.Serializati... 阅读全文
posted @ 2014-08-16 08:47 不负春光,努力生长 阅读(641) 评论(0) 推荐(0)