如图: 有两种配置形式。 一种是在项目中(可以启动的项目,类库不行)配置模板文件,另一种是在项目编译之后配置。 第一种方法在项目中新建一个 runtimeconfig.template.json 文件。 示例如下: { "runtimeOptions": { "configProperties": { "System.GC.ConserveMemory": 9 } } } 另一种是项目编译之后,项目下面会有个 {项目名称}.runtimeconfig.json 文件。手动修改即可。 [......] 继续阅读

2023年11月22日 0条评论 3336点热度 0人点赞 痴者工良 阅读全文

Create a new project that only uses netstandard2. The complete content of its csproj file is as follows: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <EnforceCodeStyleI…

2023年11月21日 0条评论 1551点热度 0人点赞 痴者工良 阅读全文

新建一个项目,项目只能使用 netstandard2。 其 csproj 文件完整内容如下: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> <EnforceExtendedAn…

2023年11月21日 0条评论 2701点热度 0人点赞 痴者工良 阅读全文

您大可以相信工良出品。本文从 C# 角度开始一点点编码,逐步了解 RabbitMQ 编程的各种细节,学会消息处理机制和多种场景下的开发细节。虽然文章比较长,但是不会啰啰嗦嗦说一堆理论。

2023年11月16日 0条评论 2138点热度 3人点赞 痴者工良 阅读全文

您大可以相信工良出品。本文从 C# 角度开始一点点编码,逐步了解 RabbitMQ 编程的各种细节,学会消息处理机制和多种场景下的开发细节。虽然文章比较长,但是不会啰啰嗦嗦说一堆理论。

2023年11月16日 0条评论 4873点热度 3人点赞 痴者工良 阅读全文

折腾了好一段时间,office 365、outlook 等的授权验证方式过于麻烦,因此记录开发步骤。 大概开发过程如下: Go to register an Azure account, and then register the application. The tenant invites the user to join the organization. Use the application to obtain user authorization via the OAuth 2.0 link. Obta…

2023年11月7日 11条评论 2068点热度 2人点赞 痴者工良 阅读全文

折腾了好一段时间,office 365、outlook 等的授权验证方式过于麻烦,因此记录开发步骤。 大概开发过程如下: 1,去注册 Azure 账号,然后进行应用注册。 2,租户邀请该用户加入组织中。 3,使用应用通过 OAuth 2.0 链接,获取用户的授权。 4,获取用户的 access_token 访问用户信息、替用户发送邮件等。 但是这些过程并不是一帆风顺,有很多曲折。比如不能跨租户访问等,必须先邀请用户加入组织。 否则会报错: AADSTS50020: User account 'xxx@xxx.onm…

2023年11月7日 11条评论 25149点热度 2人点赞 痴者工良 阅读全文

The CommunityToolkit.Mvvm package is mainly used for code generation, which helps reduce the amount of code users need to write. It facilitates the implementation of the MVVM design pattern in WPF, thereby lowering code complexity. To introduce the project pac…

2023年11月2日 0条评论 1315点热度 2人点赞 痴者工良 阅读全文

包 CommunityToolkit.Mvvm 主要用于代码生成,能够为用户减少编写大量的代码,在 WPF 中可以实现 MVVM 设计模式,降低代码复杂度。 引入项目包: <PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1 "/> 要学习 MVVM,需要关注以下类型: CommunityToolkit.Mvvm.ComponentModel ObservableObject ObservableRecipient Observ…

2023年11月2日 0条评论 5531点热度 2人点赞 痴者工良 阅读全文

Spire.pdf and other libraries for printing PDFs require payment, so this article demonstrates printing using Google's open-source PDFium project, which is open-source and cross-platform. bblanchon.PDFium.Win32 is a library that wraps PDFium using C#. Introduci…

2023年10月25日 3条评论 6564点热度 1人点赞 痴者工良 阅读全文

Spire.pdf 等打印 pdf 的库需要付费,因此本篇文章是通过使用 Google 开源的 PDFium 项目实现打印, PDFium 项目开源且跨平台。 bblanchon.PDFium.Win32 则是一个使用 C# 封装了 PDFium 的库。 引入三个库: <ItemGroup> <PackageReference Include="bblanchon.PDFium.Win32" Version="122.0.6259" /> <PackageReference Inclu…

2023年10月25日 3条评论 7524点热度 1人点赞 痴者工良 阅读全文

图片转换需要安装:https://ghostscript.com/ 引入: <ItemGroup> <PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.4.0" /> <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />…

2023年10月25日 0条评论 1052点热度 0人点赞 痴者工良 阅读全文

图片转换需要安装:https://ghostscript.com/ 引入: <ItemGroup> <PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.4.0" /> <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" /> </ItemGroup> 定义转换配置: public class…

2023年10月25日 0条评论 2978点热度 0人点赞 痴者工良 阅读全文

After installing the software, it requires an update. Once the update file is complete, the version number of the program in the registry also needs to be modified. After the software is installed, it will be written into the registry. Therefore, it is suffici…

2023年10月23日 0条评论 2894点热度 0人点赞 痴者工良 阅读全文

自家的软件安装后,需要更新,更新文件完成后还需要修改注册表中关于程序的版本号。 软件安装后,会被写入注册表中。 所以只需要修改注册表的 DisplayVersion 即可,不同的程序可能还需要修改其它属性,例如 Version、DisplayName。 修改注册表可能需要管理员权限,这要看软件是安装到所有人可以使用,还是仅当前用户可以使用。 每个程序的 KEY 都是不同的,需要自行拼接。 static void Main(string[] args) { string code = "4444-4444-4444-…

2023年10月23日 0条评论 3432点热度 0人点赞 痴者工良 阅读全文

The sample code is as follows: var oldPdf = PdfReader.Open("测试.pdf"); foreach (var oldPage in oldPdf.Pages) { // Insert a page PdfPage newPage = newPdf.AddPage(); // Query elements PdfDictionary? resources = oldPage.Elements.GetDictionary("/Reso…

2023年10月18日 0条评论 1132点热度 0人点赞 痴者工良 阅读全文

示例代码如下: var oldPdf = PdfReader.Open("测试.pdf"); foreach (var oldPage in oldPdf.Pages) { // 插入一个页面 PdfPage newPage = newPdf.AddPage(); // 查询元素 PdfDictionary? resources = oldPage.Elements.GetDictionary([......]继续阅读

2023年10月18日 0条评论 2630点热度 0人点赞 痴者工良 阅读全文

The source file is a PDF composed of various points, lines, text, and tables, and all content needs to be converted into image format and stored in a PDF. Introduction: <ItemGroup> <PackageReference Include="FreeSpire.PDF" Version="8.6.…

2023年10月18日 0条评论 1112点热度 0人点赞 痴者工良 阅读全文

源文件是 PDF 全元素,也就是各种点线、文字、表格组成,需要将内容全部转成图片形式存储到 pdf 中。 引入: <ItemGroup> <PackageReference Include="FreeSpire.PDF" Version="8.6.0" /> <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" /> </ItemGroup> internal c…

2023年10月18日 0条评论 3040点热度 0人点赞 痴者工良 阅读全文

ImageMagick is a powerful image processing library that supports over 100 major file formats (excluding sub-formats). Using Magick.NET, you can use ImageMagick in C#/VB.NET/.NET Core applications without the need to install ImageMagick on the server or desktop…

2023年10月17日 0条评论 3008点热度 0人点赞 痴者工良 阅读全文
14567854