摘要: 1、halcon导出函数 read_image(Image, '1.png') get_image_size (Image, Width, Height) dev_open_window (0, 0, Width-500, Height-500, 'black', WindowHandle) dev 阅读全文
posted @ 2024-06-30 16:26 JohnnyLei 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1、找到安装目录下的halcondotnet.dll 2、自己新增dlls离线程序集合文件夹 3、放入halcondotnet.dll 4、wpf程序右键引用dll 5、报错 System.Drawing.Common问题 nuget安装包 System.Drawing.Common 6、wpf使用 阅读全文
posted @ 2024-06-30 15:53 JohnnyLei 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 故障显示 System.AggregateException:“One or more errors occurred. (The 'applicationUrl' setting must be an https address unless the 'ASPIRE_ALLOW_UNSECURED 阅读全文
posted @ 2024-06-11 11:05 JohnnyLei 阅读(7) 评论(0) 推荐(1) 编辑
摘要: 1、设置声音文件的输出 2、编译检测目录的文件 3、安装 NAudio GitHub - naudio/NAudio: Audio and MIDI library for .NET dotnet add package NAudio --version 2.2.1 4、封装类文件 using NA 阅读全文
posted @ 2024-05-25 13:37 JohnnyLei 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 1、nuget安装库 2、视频设置 3、xaml <UserControl x:Class="WpfApp4TestVLC.View.HomeView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x 阅读全文
posted @ 2024-05-23 10:55 JohnnyLei 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 1、打开.NET Reactor V6.8.0.0 2、选择dll混淆 3、拖入dll 4、执行加密混淆 5、打开dll同级下的_Secure结尾的文件夹,里面有混淆后的dll 6、将两个加密混淆后的文件 进行覆盖到原来的dll 7、使用dotpeek反编译查看加密混淆后的dll ,混淆是完成的。。 阅读全文
posted @ 2024-05-16 16:02 JohnnyLei 阅读(25) 评论(0) 推荐(0) 编辑
摘要: Modbus字节序说明 用littly endine byte swap 解析寄存器 最近做ModBus TCP方面的测试有点多,尽管对于ModBus协议算是比较了解了,也经常知道字节传输序列的不同对工程师带来了很多不必要的麻烦,这不是一个技术难题,仅仅只是过去各家各户开发遗留下来的标准统一问题,所 阅读全文
posted @ 2024-05-08 15:54 JohnnyLei 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 准备拼接文件 里面放的是需要拼接视频文件的路径 concat_list.txt 准备代码 private void CombineFile(string filesDir, string targetmp4fileName) { string basedir = AppDomain.CurrentD 阅读全文
posted @ 2024-04-20 15:29 JohnnyLei 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 文件需要: 1、m3u8文件 32225.m3u8 2、key文件 88d73ccaf175e3ff.ts 3、加密后无法观看的ts视频文件 322251.ts 代码1: try { //1 获取m3u8中的iv信息 string m3u8encodeKeyContent = File.ReadAl 阅读全文
posted @ 2024-04-20 14:54 JohnnyLei 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 使用vmprotect 对Aot发布后的exe 进行加密混淆 使用的visual studio 2022 版本: 1、发布Avalonia aot <!--加入条件开启vs .net8的axmal的预览--> <PublishAot Condition="'$(Configuration)' == 阅读全文
posted @ 2024-04-17 14:55 JohnnyLei 阅读(227) 评论(0) 推荐(1) 编辑
摘要: 代码 App.xaml.cs protected override void OnStartup(StartupEventArgs e) { //新增内存回收 this.MemoryHelper(); } private void MemoryHelper(int second = 30) { Th 阅读全文
posted @ 2024-01-19 16:57 JohnnyLei 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 安装包 CS-Script.Core 编写脚本 工艺文件1.txt using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; 阅读全文
posted @ 2023-12-12 16:10 JohnnyLei 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 以下示例创建一个信号量,其最大计数为三个线程,初始计数为零个线程。该示例启动了 5 个任务,所有这些任务都阻塞等待信号量。主线程调用 Release(Int32) 重载以将信号量计数增加到最大值,这允许三个任务进入信号量。每次释放信号量时,都会显示之前的信号量计数。控制台消息跟踪信号量的使用情况。每 阅读全文
posted @ 2023-12-12 10:35 JohnnyLei 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 在WPF中,Semaphore是System.Threading命名空间中的一个类,用于控制对共享资源的访问。 如果有多个线程需要同时访问某个共享资源,可以使用Semaphore来实现线程的同步和互斥。 Semaphore通常用于以下两种场景: 控制同时访问的线程数量:可以通过Semaphore的构 阅读全文
posted @ 2023-12-12 10:26 JohnnyLei 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 设置颜色:Color color = Color.FromArgb(透明度, red数字, green数字, blue数字); //这四个数字范围都是(0-255)Color color = Color.FromRgb(red数字, green数字, blue数字);//默认透明度为255; but 阅读全文
posted @ 2023-12-07 15:43 JohnnyLei 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 简单封装一个时间日期 输入框 DateTimePicker.xaml <UserControl x:Class="FullApp5DateTimePicker.Modules.ModuleName.Views.DateTimePicker" xmlns="http://schemas.microso 阅读全文
posted @ 2023-11-28 16:21 JohnnyLei 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 方式1 直接播放指定路径 private DelegateCommand _PlaySoundCommand; public DelegateCommand PlaySoundCommand => _PlaySoundCommand ?? (_PlaySoundCommand = new Deleg 阅读全文
posted @ 2023-11-25 11:20 JohnnyLei 阅读(205) 评论(0) 推荐(1) 编辑
摘要: 查看网页get的请求 fiddler 查看一次请求参数 请求方法 HttpClientHandler handler = new HttpClientHandler() { UseCookies = false, AutomaticDecompression = DecompressionMetho 阅读全文
posted @ 2023-11-24 15:40 JohnnyLei 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 1、安装Blazor.BrowserExtension.Template模板 dotnet new --install Blazor.BrowserExtension.Template 2、新建项目 dotnet new browserext --name 你的项目名称 3、修改代码 4、运行程序 阅读全文
posted @ 2023-11-15 10:16 JohnnyLei 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 1、原始代码 <Grid > <i:Interaction.Triggers> <i:EventTrigger EventName="PreviewMouseLeftButtonDown"> <i:InvokeCommandAction Command="{Binding DataContext.M 阅读全文
posted @ 2023-11-06 17:12 JohnnyLei 阅读(199) 评论(0) 推荐(0) 编辑