技术
📅 2026-05-20
🏷️ WPF
WPF内存排序优选方案
阅读全文 →
📅 2025-09-17
🏷️
void SortRecipeFolder<T>(IEnumerable<T> source, string sortName, ListSortDirection direction)
{
var collectionView = CollectionViewSource.GetDefaultView(source)
阅读全文 →
📅 2025-09-08
🏷️
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using (var bitmap = new Bitmap(4, 2, PixelFormat.Format8bppIndexed))
{
//bitmap.Palette.Entries[0] = Color.R
阅读全文 →
📅 2024-05-23
🏷️
using (var target = new GDI.Bitmap(path))
{
var buffer = target.LockBits(
new GDI.Rectangle(0, 0, target.Width, target.Height),
阅读全文 →
📅 2024-01-03
🏷️
在项目中做一个批量读取bin目录下的所有DLL动态装在到Ioc容器的功能,读取方法使用的 Assembly.LoadFrom(path); 常规情况下使用是没有问题的,但是如果程序依赖的某一个库本身还需要依赖非dotnet生成的非托管DLL,如sqlite的依赖库,使用这个方法就会报错,此为背景。
要解决这个问题最开始想到的方案是直接try catch 包围 Assembly.LoadFrom 语
阅读全文 →