摘要: 注意事项 上一篇已经说明,这次就不一一说了,直接来正文; word内容 相关代码 方法1 1 static void Main(string[] args) 2 { 3 string wordPathStr = @"C:\Users\user\Desktop\新建文件夹 (2)\openxml读取表 阅读全文
posted @ 2017-12-13 22:55 *飞* 阅读(1374) 评论(0) 推荐(0) 编辑
摘要: 问题:NamedPipeClientStream对象调用Connect(毫秒)时报“访问路径被拒绝” 解决: 在服务端(NamedPipeServerStream)中添加PipeSecurity对象 SecurityIdentifier securityIdentifier = new Securi 阅读全文
posted @ 2024-03-27 11:29 *飞* 阅读(10) 评论(0) 推荐(0) 编辑
摘要: public class StudentInfo { public static StudentInfo studentLazy = new Lazy<StudentInfo>(() => new StudentInfo()).Value; public int StudentID{ get; se 阅读全文
posted @ 2023-02-28 09:59 *飞* 阅读(17) 评论(0) 推荐(0) 编辑
摘要: *.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing; 阅读全文
posted @ 2023-02-24 14:30 *飞* 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 下拉框名称.DefaultCellStyle.NullValue= 内容 阅读全文
posted @ 2023-02-01 10:23 *飞* 阅读(25) 评论(0) 推荐(0) 编辑
摘要: [DllImport("user32.dll", EntryPoint = "WindowText", CharSet = CharSet.Ansi)] public static extern int SetWindowText(IntPtr hWnd, string content); Wind 阅读全文
posted @ 2022-11-15 15:12 *飞* 阅读(17) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 计算CRC检验 /// </summary> /// <param name="value"></param> /// <param name="p"></param> /// <param name="iCRC"></param> /// <returns></ 阅读全文
posted @ 2022-10-19 20:04 *飞* 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 问题: 界面ShowDialog后,一番操作后关闭弹框,关闭弹框后的用户对象数量大于界面ShowDialog之前用户对象数量 解决办法:在关闭弹框后主动把资源释放掉,使用Dispose方法,xxx.Dispose(); PS:如果所有弹框都继承一个父窗体,在父窗体中的Closed事件中把资源释放掉会 阅读全文
posted @ 2021-07-05 09:53 *飞* 阅读(64) 评论(0) 推荐(0) 编辑
摘要: package main import ( "bufio" "fmt" "os" "strings" ) func main() { file, err := os.Open(`C:\Users\1\Desktop\序列.txt`) if err != nil { return } defer fi 阅读全文
posted @ 2021-06-16 13:07 *飞* 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 在工具箱内搜索SerialPort控件,拖到自己项目即可; 添加Serialport接收信息事件 Serialport接收信息事件 int num = serialPort.BytesToRead; byte[] data = new byte[num]; serialPort.Read(data, 阅读全文
posted @ 2020-08-12 21:46 *飞* 阅读(489) 评论(0) 推荐(0) 编辑
摘要: 实现功能(暂无实现文件上传到数据库,只实现界面上传效果): 上传文件名称展示,上传文件名称展示, 上传进度展示,上传速度展示,单个取消操作,全部取消操作; 界面展示 1,设置时间触发器 /// <summary> /// 时间事件触发文件上传 /// </summary> private void 阅读全文
posted @ 2020-07-28 10:01 *飞* 阅读(173) 评论(0) 推荐(0) 编辑