上一页 1 2 3 4 5 6 7 ··· 15 下一页

2023年6月10日

Wpf DataGrid 'Refresh' is not allowed during an AddNew or EditItem transaction.

摘要: DataGrid对象.CancelEdit(); DataGrid对象.CommitEdit();DataGrid对象.Items.Refresh(); 阅读全文

posted @ 2023-06-10 13:28 wu.g.q 阅读(100) 评论(0) 推荐(0)

2023年6月7日

C# 获取本地磁盘驱动器、U盘、共享目录所在驱动器的大小

摘要: string filePathRoot = Path.GetPathRoot(fileName); if (!filePathRoot.EndsWith("\\")) { filePathRoot = filePathRoot + "\\"; } DriveType driveType = (Dri 阅读全文

posted @ 2023-06-07 15:24 wu.g.q 阅读(340) 评论(0) 推荐(0)

2023年6月6日

C# MemoryStream转GZipStream 到文件

摘要: 压缩: public static void MemoryStreamCompress(string fileName, MemoryStream memStream) { FileStream fsWrite = File.OpenWrite(fileName); byte[] bytes = n 阅读全文

posted @ 2023-06-06 15:03 wu.g.q 阅读(77) 评论(0) 推荐(0)

2023年5月10日

C# BeginInvoke EndInvoke

摘要: 如遇到以下两种需求时,可以试试 BeginInvoke 方法 1.某些时候需要开线程处理,需要主线程子线程配合完成 1-1.投票 using System; using System.Collections.Generic; using System.Linq; using System.Text; 阅读全文

posted @ 2023-05-10 17:08 wu.g.q 阅读(124) 评论(0) 推荐(0)

2023年5月8日

Batocera教程(踩坑情况记录)

摘要: 一、什么是快乐星球 Batocera Batocera是专门为复古游戏开发的、基于Linux的操作系统,由于windows系统需要预存一部分资源确保系统正常运行,所以在很多老式电脑上装模拟器(例如nds)就会很卡。 其次是把游戏和系统装到u盘或是其他储存介质中,可以轻松做到随时随地摸鱼,岂不是爽爆( 阅读全文

posted @ 2023-05-08 15:13 wu.g.q 阅读(3229) 评论(0) 推荐(0)

2023年5月5日

WPF 源码查看链接

摘要: wpf 源码链接: Reference Source (microsoft.com) 阅读全文

posted @ 2023-05-05 16:44 wu.g.q 阅读(14) 评论(0) 推荐(0)

C# 获取本地共享目录和网络共享目录

摘要: 1.在工程添加对应的cs文件 using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Li 阅读全文

posted @ 2023-05-05 15:07 wu.g.q 阅读(801) 评论(0) 推荐(0)

Wpf Datagrid 操作总结

摘要: 1. 行选中时,.SelectedIndex可以获取行索引,多行选中可用 SelectedItems 2.单元格选中时,获取行索引可以用以下(Grid为DataGrid的对象) DataGridCellInfo selectedCell = Grid.SelectedCells.FirstOrDef 阅读全文

posted @ 2023-05-05 14:48 wu.g.q 阅读(355) 评论(0) 推荐(0)

2023年4月3日

C# 压缩与解压操作

摘要: 依赖:.NET Framework 4.5及以上,引用 - 添加引用 - 程序集System.IO.CompressionSystem.IO.Compression.FileSystem 针对文件夹的最简单的压缩与解压缩1、目录必须存在2、无法覆盖文件 public static void DoZi 阅读全文

posted @ 2023-04-03 10:54 wu.g.q 阅读(191) 评论(0) 推荐(0)

2023年3月31日

C# Wpf list 前移后移一个元素的操作

摘要: //List 向后移动一个元素 private void MoveBehindUtilityDataList(List<T> UtilityRecordList, int MoveIndex, T MovedData) { T Current, tmp; tmp = T[MoveIndex]; fo 阅读全文

posted @ 2023-03-31 10:10 wu.g.q 阅读(241) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 15 下一页

导航