摘要: 1、halcon导出函数 *读取图片 read_image (Image, 'C:/Users/admin/Desktop/halcondemo1/claudia.png') get_image_size (Image, Width, Height) dev_close_window () dev_ 阅读全文
posted @ 2024-06-30 16:26 JohnnyLei 阅读(447) 评论(0) 推荐(1)
摘要: 1、nuget安装HalconDotNet包 2、报错 System.Drawing.Common问题 nuget安装包 System.Drawing.Common 3、wpf使用halcondotnet.dll 程序集 <UserControl x:Class="HalconDemoTest.Mo 阅读全文
posted @ 2024-06-30 15:53 JohnnyLei 阅读(348) 评论(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 阅读(443) 评论(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 阅读(676) 评论(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 阅读(758) 评论(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 阅读(708) 评论(0) 推荐(0)
摘要: 准备拼接文件 里面放的是需要拼接视频文件的路径 concat_list.txt 准备代码 private void CombineFile(string filesDir, string targetmp4fileName) { string basedir = AppDomain.CurrentD 阅读全文
posted @ 2024-04-20 15:29 JohnnyLei 阅读(447) 评论(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 阅读(674) 评论(0) 推荐(0)
摘要: 使用vmprotect 对Aot发布后的exe 进行加密混淆 使用的visual studio 2022 版本: 1、发布aot <!--加入条件开启vs .net8的axmal的预览--> <PublishAot Condition="'$(Configuration)' == 'Release' 阅读全文
posted @ 2024-04-17 14:55 JohnnyLei 阅读(2703) 评论(0) 推荐(3)
摘要: 代码 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 阅读(268) 评论(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 阅读(349) 评论(0) 推荐(0)
摘要: 以下示例创建一个信号量,其最大计数为三个线程,初始计数为零个线程。该示例启动了 5 个任务,所有这些任务都阻塞等待信号量。主线程调用 Release(Int32) 重载以将信号量计数增加到最大值,这允许三个任务进入信号量。每次释放信号量时,都会显示之前的信号量计数。控制台消息跟踪信号量的使用情况。每 阅读全文
posted @ 2023-12-12 10:35 JohnnyLei 阅读(78) 评论(0) 推荐(0)
摘要: 在WPF中,Semaphore是System.Threading命名空间中的一个类,用于控制对共享资源的访问。 如果有多个线程需要同时访问某个共享资源,可以使用Semaphore来实现线程的同步和互斥。 Semaphore通常用于以下两种场景: 控制同时访问的线程数量:可以通过Semaphore的构 阅读全文
posted @ 2023-12-12 10:26 JohnnyLei 阅读(97) 评论(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 阅读(429) 评论(0) 推荐(1)
摘要: 简单封装一个时间日期 输入框 DateTimePicker.xaml <UserControl x:Class="FullApp5DateTimePicker.Modules.ModuleName.Views.DateTimePicker" xmlns="http://schemas.microso 阅读全文
posted @ 2023-11-28 16:21 JohnnyLei 阅读(569) 评论(0) 推荐(0)
摘要: 方式1 直接播放指定路径 private DelegateCommand _PlaySoundCommand; public DelegateCommand PlaySoundCommand => _PlaySoundCommand ?? (_PlaySoundCommand = new Deleg 阅读全文
posted @ 2023-11-25 11:20 JohnnyLei 阅读(471) 评论(0) 推荐(1)
摘要: 1、安装Blazor.BrowserExtension.Template模板 dotnet new --install Blazor.BrowserExtension.Template 2、新建项目 dotnet new browserext --name 你的项目名称 3、修改代码 4、运行程序 阅读全文
posted @ 2023-11-15 10:16 JohnnyLei 阅读(259) 评论(0) 推荐(0)
摘要: 1、原始代码 <Grid > <i:Interaction.Triggers> <i:EventTrigger EventName="PreviewMouseLeftButtonDown"> <i:InvokeCommandAction Command="{Binding DataContext.M 阅读全文
posted @ 2023-11-06 17:12 JohnnyLei 阅读(497) 评论(0) 推荐(1)
摘要: framework版本引入命名空间 通过在代码中引入System.Windows.Interactivity.dll,引入了这个dll后我们就能够使用这个里面的方法来将事件映射到ViewModel层了,我们来看看具体的使用步骤,第一步就是引入命名控件 xmlns:i="clr-namespace:S 阅读全文
posted @ 2023-10-27 09:45 JohnnyLei 阅读(3590) 评论(0) 推荐(0)
摘要: 表示线程同步事件在一个等待线程释放后收到信号时自动重置。 此类不能被继承。 以下示例演示如何在AutoResetEventSet每次用户按 Enter 键时调用基类上的 方法 () 一次释放一个线程。 该示例启动三个 AutoResetEvent 线程,等待在信号状态下创建的 。 第一个线程会立即释 阅读全文
posted @ 2023-09-24 23:35 JohnnyLei 阅读(65) 评论(0) 推荐(0)