随笔分类 - C#
摘要:if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")//判断是否为设计时 { return;} if (Site == null || !this.Site.DesignMode)//运行时。。。 {
阅读全文
摘要:private void DGV_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { if (e.ColumnIndex >= 0 && DGV.Columns[e.ColumnIndex].Name == "字段名称
阅读全文
摘要:https://malic.xyz/archives/1607 following-sibling选取当前节点之后的所有兄弟节点 要定位当前td同级后的一个td //td[.='text']/following-sibling::td https://www.cnblogs.com/VseYoung
阅读全文
摘要:using CLRConsole = System.Console; namespace ExtensionMethodsDemo { public static class Console { public static void WriteLine(string value) { CLRCons
阅读全文
摘要:https://blog.csdn.net/kucoffee12/article/details/81874138 string str = "fxq.5.6.doc"; //文件名称中设计多个特定符号; str = str.Substring(0, str.LastIndexOf(".")); C
阅读全文
摘要:DataGridView.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(Data
阅读全文
摘要:推荐 官网 http://www.hzhcontrols.com/ NetWinform自定义控件 English README.md(github) English README.md(gitee) 根据该控件库重写 https://www.cnblogs.com/bfyx/p/11641874.
阅读全文
摘要:extern alias VideoFFMPEGX64;using VideoFFMPEGX64::Accord.Video.FFMPEG;
阅读全文
摘要:https://blog.csdn.net/plato_2/article/details/17434715?spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIS
阅读全文
摘要:https://www.cnblogs.com/LukeSteven/p/14643499.html
阅读全文
摘要:灵感来源:https://blog.csdn.net/anonymous_qsh/article/details/78596695 public static Hashtable ObjectToMap(object obj, bool isIgnoreNull = false) { Hashtab
阅读全文
摘要:/// <summary> /// DataRow 转 Model /// </summary> /// <typeparam name="T"></typeparam> /// <param name="row"></param> /// <returns></returns> public st
阅读全文
摘要:关于监听回调两次的原因,可能是因为重新监听导致的,所以查到微软上面的解析是说 BeginGetContext方法开始异步 (非阻塞) 调用以接收传入的客户端请求。 在调用此方法之前,必须调用 Start 方法,并添加至少一个统一资源标识符 (uri) 前缀,以便通过将 uri 字符串添加到属性返回的
阅读全文
摘要:#region 窗体移动 [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "ReleaseCapture")] private static extern void ReleaseCapture(); [Sys
阅读全文
摘要:#region 设置窗体圆角 /// <summary> /// 设置窗体圆角 /// </summary> /// <param name="f"></param> public static void FormRounded(this Form f) { f.Resize += (object
阅读全文
摘要:https://www.cnblogs.com/mqxs/p/9466218.html public class FormShadow : Form { public FormShadow() { Initialize(); } /// <summary> /// 界面加载 /// </summar
阅读全文
摘要:https://www.cnblogs.com/ZCoding/p/4274026.html System.Diagnostics.Stopwatch stopwatch = new Stopwatch();stopwatch.Start(); // 开始监视代码运行时间// 需要测试的代码 ...
阅读全文
摘要:https://blog.csdn.net/qq_37664403/article/details/118747195 1.Debug模式,Release模式#if DEBUGConsole.WriteLine(“Debug模式”);#elseConsole.WriteLine(“Release模式
阅读全文
摘要:用:CellPainting 事件去修改颜色不会那么卡 private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { if (e.ColumnIndex >= 0 && rc
阅读全文
摘要:[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)] static extern int ByteEquals(byte[] b1, byte[] b2, long count); /// <summary> /
阅读全文