上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 19 下一页
摘要: this.Invoke(new MethodInvoker(() => { //TO DO })); this.Invoke(new Action(()=>{ // TO DO })); 阅读全文
posted @ 2018-01-03 09:54 会弹猫的吉他 阅读(503) 评论(0) 推荐(0) 编辑
摘要: [STAThread] static void Main() { if (Environment.OSVersion.Version.Major >= 6) SetProcessDPIAware(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderi... 阅读全文
posted @ 2017-12-18 12:34 会弹猫的吉他 阅读(923) 评论(0) 推荐(0) 编辑
摘要: /* 正则验证 */ /// /// 返回与模式字符串匹配的值 /// /// 输入字符串 /// 模式字符串 /// public static string Match(this string input, string pattern) { return input.IsNullOrEmpty() ? null : Regex.Match(input, pattern).Value;... 阅读全文
posted @ 2017-12-15 16:04 会弹猫的吉他 阅读(158) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections; using System.Xml; namespace Services.Tool { public class XmlHelper { #region 公共变量 public static XmlDocument xmldoc; public stat... 阅读全文
posted @ 2017-12-12 11:11 会弹猫的吉他 阅读(162) 评论(0) 推荐(0) 编辑
摘要: /// /// 获取WebBrowser指定的图片 /// /// 需要获取图片的WebBrowser /// 指定的图片的id(优先查找指定id) /// 指定的图片的src,支持模糊查询 /// 指定的图片的src, 支持模糊查询 /// public static Image GetRegCodePic(ref WebBrowser w... 阅读全文
posted @ 2017-12-11 17:13 会弹猫的吉他 阅读(924) 评论(0) 推荐(0) 编辑
摘要: namespace System { /// /// 为指定的实例创建有线程安全的单例模式。实例必须有一个公开的,无参数的构造方法,并且能正确的被实例化。 /// /// 作为单例的对象。 public static class Singleton where T : class { static volatile... 阅读全文
posted @ 2017-12-11 11:39 会弹猫的吉他 阅读(257) 评论(0) 推荐(0) 编辑
摘要: /// /// /// 将实体类/匿名对象转换为SqlParameter列表 /// 示例1: 实体类 /// EntityClass entityClass = new EntityClass(){ Id = 1 , Name="名称"}; SqlParameter[] parms = entityClass.ToSqlParameterArray() /// 示例2: 匿名对象 /// ... 阅读全文
posted @ 2017-12-11 09:55 会弹猫的吉他 阅读(731) 评论(0) 推荐(0) 编辑
摘要: protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Entity().Property(p => p.ID) .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None); } 也可以通过在实体类属性上加标记实现: publ... 阅读全文
posted @ 2017-12-11 09:41 会弹猫的吉他 阅读(317) 评论(0) 推荐(0) 编辑
摘要: System.Text.RegularExpressions.MatchCollection ms = System.Text.RegularExpressions.Regex.Matches(ecarvoText, "\\\"[a-zA-Z0-9]+\\\"\\s*:"); foreach (System.Text.RegularExpressions.... 阅读全文
posted @ 2017-12-07 09:40 会弹猫的吉他 阅读(147) 评论(0) 推荐(0) 编辑
摘要: static string ReturnData(int resultCode, string resultMessage = "", string resultData = "") { return JObject.FromObject(new { resultCode = resultCode, ... 阅读全文
posted @ 2017-12-07 09:32 会弹猫的吉他 阅读(286) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 19 下一页