随笔分类 -  C#

摘要:修改项目的csproj文件 <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net6.0-windows</TargetFramework> <Nullable>enable</Nullable> <UseWPF>tr 阅读全文
posted @ 2023-11-26 11:39 yzhyingcool 阅读(308) 评论(0) 推荐(1) 编辑
摘要:官方网站 https://fontawesome.com/ ##########下载 下载地址:https://fontawesome.com/download 下载内容:Free For Web ##########使用 双击**.ttf,进入安装页可以看到“字体名称……”,记住字体名称 将 ** 阅读全文
posted @ 2022-06-10 11:18 yzhyingcool 阅读(543) 评论(0) 推荐(0) 编辑
摘要:使用Microsoft.Office.Interop.Word操作Word using System; using System.Collections.Generic; using Word = Microsoft.Office.Interop.Word; namespace Com.FTools 阅读全文
posted @ 2022-05-04 12:06 yzhyingcool 阅读(600) 评论(0) 推荐(0) 编辑
摘要:工程说明 一、Com.FToolsforExcel.Progress项目 包含 进度窗口类ProgressWindow,用于展示进度; 委托类ProgressChangedEventHandler,参数是自定义的ProgressChangedEventArgs(进度消息参数)类型; 进度消息类Pro 阅读全文
posted @ 2022-03-11 20:04 yzhyingcool 阅读(225) 评论(0) 推荐(0) 编辑
摘要:有Windows资源管理器中文件名如下: 1你好.txt 、2你好.txt、11你好.txt 使用C# DirectoryInfo.GetFiles获得FileInfo[]信息的排序会是如下情况: 1你好.txt 、11你好.txt、2你好.txt 这不符合我们的使用习惯,可以借助Windows的A 阅读全文
posted @ 2021-05-13 09:05 yzhyingcool 阅读(325) 评论(0) 推荐(0) 编辑
摘要:安装与使用 工具是一个ExcelDNA的 xll 加载项,如下图,32位Excel装前者,64位装后者。 64位Excel加载如图(还可以配合ExcelDNA的函数参数提示支持xll,这里不做说明) 在【公式】—【函数】可以找到IDCardFuns类下的IDNumCheck函数,用法是=IDNumC 阅读全文
posted @ 2020-12-01 17:24 yzhyingcool 阅读(2523) 评论(0) 推荐(1) 编辑
摘要:object[,] records = worksheet.Range["A1:E"+ endRowIndex].Value2; worksheet.Range["A1"].Resize[endRowIndex, 5].Value = records; 阅读全文
posted @ 2020-11-21 17:39 yzhyingcool 阅读(1681) 评论(0) 推荐(0) 编辑
摘要:在VSTO、ExcelDna的开发方式中,提供了非常容易的实现方法,而在Com开发下则必须自己实现,具体的方法就在下面的博主抄来的内容里。 编译dll的时候注意选择32/64位 以下内容除空格外都是从 DAVID E. CRAIG 这哥们儿的博客抄来的: CustomTaskPanes in a . 阅读全文
posted @ 2020-10-25 11:57 yzhyingcool 阅读(1300) 评论(0) 推荐(0) 编辑
摘要:public class ExcelOledbHelper { private readonly string connectionStr; /// <summary> /// /// </summary> /// <param name="pathOfExcel">path of Excel, e 阅读全文
posted @ 2020-05-24 22:31 yzhyingcool 阅读(279) 评论(0) 推荐(0) 编辑
摘要:1 public class SqliteHelper 2 { 3 private readonly string connectionStr; 4 public SqliteHelper(string dbPath) 5 { 6 if (System.IO.File.Exists(dbPath)) 阅读全文
posted @ 2020-05-09 17:58 yzhyingcool 阅读(1054) 评论(0) 推荐(0) 编辑
摘要:C#写Sqlite,sqlite库从nuget获得,下载System.Data.SQLite。 连接数据库报错如下: 翻了好多博客说是C++库的问题,控制面板瞅瞅库也不少啊,试了一些也不成功。 最终把随System.Data.SQLite 一起下载的 SQLite.Interop.dll 复制到与启 阅读全文
posted @ 2020-05-07 21:29 yzhyingcool 阅读(4685) 评论(0) 推荐(0) 编辑
摘要:很简单,不翻译了。 If you are using COM components on your .NET code, you might be already aware of the Marshal.ReleaseComObject and Marshal.FinalReleaseComObj 阅读全文
posted @ 2019-06-21 16:26 yzhyingcool 阅读(834) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示