上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: 因为业务需要,百度了个可移动可改变大小的控件,然后自己修改了下,功能类似vs的设计面板中的功能差不多,可拖拽,改变大小 拖动的 public class MoveControl { #region 自定义事件 /// <summary> /// 控件移动时触发事件 /// </summary> pu 阅读全文
posted @ 2018-07-07 09:59 冰封一夏 阅读(2363) 评论(0) 推荐(1) 编辑
摘要: 需要安装Tablet pc,win7的话 直接在控制面板》程序和应用》添加组建里面勾选上添加 然后就是下面的程序了,看代码 设计文件 namespace 手写识别 { partial class Form1 { /// <summary> /// 必需的设计器变量。 /// </summary> p 阅读全文
posted @ 2018-07-04 16:07 冰封一夏 阅读(2927) 评论(0) 推荐(1) 编辑
摘要: 有时候我们不需要将WebAPI发布到iis上运行,需要将webapi内嵌到cs程序内部,随程序一起启动,其实比较简单,需要一个类,如下 然后启动的时候 调用IniWebApi函数就可以了 阅读全文
posted @ 2018-06-27 15:53 冰封一夏 阅读(538) 评论(0) 推荐(1) 编辑
摘要: 首先需要一个可绑定实体 [Serializable] public class TreeNodeModel { private Image _nodePic; /// <summary> /// 设置图标 /// </summary> public Image NodelPic { get { re 阅读全文
posted @ 2018-06-27 14:47 冰封一夏 阅读(1924) 评论(0) 推荐(3) 编辑
摘要: 跟据9png的实现原理自己写了个生成图片的函数,9png的原理是将图片切成9块如下 其中1、3、7、9不进行缩放,2,4,5,6,8进行缩放,这样就防止了放大后导致边界出现锯齿的问题 在实现过程中主要的就是找到4个关键点,如下 然后根据p1,p2,p3,p4将原图画到新大小的图上 具体代码如下 获得 阅读全文
posted @ 2018-06-15 14:06 冰封一夏 阅读(1208) 评论(0) 推荐(0) 编辑
摘要: 我们有这样的使用场景,某个订单在修改信息的时候,其他人不能修改相关的信息,比如不能做支付,不能退单等等,那么我们可以根据单号进行加锁,多Monitor做了如下扩展 定义接口 //// 文件名称:ILockExt.cs //// 创建日期:2018-06-07 10:44:39 // 功能描述:自定义 阅读全文
posted @ 2018-06-07 15:57 冰封一夏 阅读(549) 评论(0) 推荐(0) 编辑
摘要: 首先简单封装了个DbContext 1 public class DbContext 2 { 3 #region 属性字段 4 private static string _connectionString; 5 6 /// <summary> 7 /// 连接字符串 by beck.huang 2 阅读全文
posted @ 2018-06-02 11:56 冰封一夏 阅读(10215) 评论(18) 推荐(6) 编辑
摘要: 当我们有一些这样的需求,比如某个订单中下单,修改等等这些是单例执行的,不能同步操作,当然这样的情况你可以使用数据库的行锁来实现,但是我们代码里面实现的话 ,我们也要用到锁,大部分情况下我们使用lock(this) lock(static objcet)这样的锁,但是这样的并不能满足行锁的功能 此时, 阅读全文
posted @ 2018-05-29 11:46 冰封一夏 阅读(584) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; namespace HQTX_BatchAddData { /// /// WinInet.dll wrapper //... 阅读全文
posted @ 2018-01-15 20:28 冰封一夏 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 写个叫号的小demo 长相如下 代码如下 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 阅读全文
posted @ 2017-12-15 13:41 冰封一夏 阅读(1003) 评论(0) 推荐(1) 编辑
摘要: HttpWebRequest 请求时,服务器会返回500 501这些错误 并包含错误信息,通过如下代码可以拿到错误信息 阅读全文
posted @ 2017-12-03 15:39 冰封一夏 阅读(3919) 评论(0) 推荐(0) 编辑
摘要: 先看下请求方法 需要注意的是 1、当使用https请求的时候需要确定加密协议是哪个,这个可以通过火狐查看到,如下图 2、只有Framework4.5及以上才支持1.1和1.2协议 如果仍有什么不明白的地方请留言吧 阅读全文
posted @ 2017-06-25 16:54 冰封一夏 阅读(3229) 评论(0) 推荐(0) 编辑
摘要: 有需求需要将json的字段转换为小写,使用正则表达式实现,代码如下 正则表达式为 \"[a-zA-Z0-9]+\"\s*: 阅读全文
posted @ 2017-06-02 09:52 冰封一夏 阅读(811) 评论(0) 推荐(0) 编辑
摘要: c# 爬虫常用的3个方法,备份一下 1 using System; 2 using System.Collections.Generic; 3 using System.IO; 4 using System.Linq; 5 using System.Net; 6 using System.Text; 阅读全文
posted @ 2017-05-08 20:19 冰封一夏 阅读(1200) 评论(0) 推荐(1) 编辑
摘要: 代码就这么简单,备忘 阅读全文
posted @ 2017-04-27 15:31 冰封一夏 阅读(970) 评论(0) 推荐(0) 编辑
摘要: 在CS模式开发中一般我们需要用到大量的线程来处理比较耗时的操作,以防止界面假死带来不好的体验效果,下面我将我定义的线程基类给大家参考下,如有问题欢迎指正。 基类代码 1 #region 方法有返回值 2 /// <summary> 3 /// 功能描述:多线程执行方法,方法有返回值 4 /// 作 阅读全文
posted @ 2017-03-30 10:02 冰封一夏 阅读(694) 评论(0) 推荐(0) 编辑
摘要: WebRequest请求错误(服务器提交了协议冲突. Section=ResponseHeader Detail=CR 后面必须是 LF)解决办法,天津config文件,增加一个配置如下 其他配置信息不变即可。 阅读全文
posted @ 2017-02-07 09:52 冰封一夏 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 验证码生成页面代码(清理掉没用的html) using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.We 阅读全文
posted @ 2016-11-09 17:19 冰封一夏 阅读(833) 评论(0) 推荐(0) 编辑
摘要: 使用NPOI导出,读取EXCEL,具有可追加功能 看代码 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using System.IO; 5 using System.Data; 6 using 阅读全文
posted @ 2016-10-25 10:47 冰封一夏 阅读(963) 评论(0) 推荐(0) 编辑
摘要: 颜色聚类 1 public static class KmeansColor 2 { 3 /* 4 * 聚类函数主体。 5 * 针对一维 double 数组。指定聚类数目 k。 6 * 将数据聚成 k 类。 7 */ 8 public static Color[][] cluster(Color[] 阅读全文
posted @ 2016-09-09 17:59 冰封一夏 阅读(414) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
HZHControls控件库官网:http://hzhcontrols.com