12 2024 档案
摘要: 
阅读全文
摘要:1.问题描述 当DataGridView频繁更新数据源时,可能会导致界面闪烁、性能下降等问题。这是因为每次更新数据源时,DataGridView都需要重新绘制和绑定数据,这是一个相对耗时的过程。 2.解决方案 使用BindingList代替普通List作为数据源(适用于简单数据更新) Binding
阅读全文
摘要:1:引用命名空间 using System.Runtime.InteropServices; 2:想要拖动窗体的控件绑定MouseDown事件 点击查看代码 //窗体移动 [DllImport("user32.dll")] public static extern bool ReleaseCaptu
阅读全文
摘要:1.用Modbus工具模拟PLC 2.创建一个实体类 点击查看代码 internal class Data : INotifyPropertyChanged { ushort[] ushorts = new ushort[10]; public ushort D0 { get => ushorts[
阅读全文