会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
JohnnyLei's Blog
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
下一页
2024年5月25日
avalonia 桌面端 播放声音文件
摘要: 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
阅读(617)
评论(0)
推荐(0)
2024年5月23日
wpf vlc 播放本地mp4视频 LibVLCSharp.WPF
摘要: 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
阅读(700)
评论(0)
推荐(0)
2024年5月16日
.net7 dll 程序集使用.NET Reactor进行加密混淆
摘要: 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
阅读(635)
评论(0)
推荐(0)
2024年5月8日
Modbus字节序说明
摘要: Modbus字节序说明 用littly endine byte swap 解析寄存器 最近做ModBus TCP方面的测试有点多,尽管对于ModBus协议算是比较了解了,也经常知道字节传输序列的不同对工程师带来了很多不必要的麻烦,这不是一个技术难题,仅仅只是过去各家各户开发遗留下来的标准统一问题,所
阅读全文
posted @ 2024-05-08 15:54 JohnnyLei
阅读(3425)
评论(0)
推荐(1)
2024年4月20日
C# ffmpeg m3u8 ts 视频拼接mp4
摘要: 准备拼接文件 里面放的是需要拼接视频文件的路径 concat_list.txt 准备代码 private void CombineFile(string filesDir, string targetmp4fileName) { string basedir = AppDomain.CurrentD
阅读全文
posted @ 2024-04-20 15:29 JohnnyLei
阅读(409)
评论(0)
推荐(0)
C# 解密m3u8 ts视频文件(AES-128)为mp4
摘要: 文件需要: 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
阅读(613)
评论(0)
推荐(0)
2024年4月17日
C# .Net8 Aot Avalonia加密混淆
摘要: 使用vmprotect 对Aot发布后的exe 进行加密混淆 使用的visual studio 2022 版本: 1、发布aot <!--加入条件开启vs .net8的axmal的预览--> <PublishAot Condition="'$(Configuration)' == 'Release'
阅读全文
posted @ 2024-04-17 14:55 JohnnyLei
阅读(2574)
评论(0)
推荐(3)
2024年1月19日
wpf 内存减少使用 GC回收
摘要: 代码 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
阅读(248)
评论(0)
推荐(0)
2023年12月12日
CS-Script.Core C#通过读取文本实现动态脚本
摘要: 安装包 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
阅读(324)
评论(0)
推荐(0)
SemaphoreSlim
摘要: 以下示例创建一个信号量,其最大计数为三个线程,初始计数为零个线程。该示例启动了 5 个任务,所有这些任务都阻塞等待信号量。主线程调用 Release(Int32) 重载以将信号量计数增加到最大值,这允许三个任务进入信号量。每次释放信号量时,都会显示之前的信号量计数。控制台消息跟踪信号量的使用情况。每
阅读全文
posted @ 2023-12-12 10:35 JohnnyLei
阅读(66)
评论(0)
推荐(0)
Semaphore
摘要: 在WPF中,Semaphore是System.Threading命名空间中的一个类,用于控制对共享资源的访问。 如果有多个线程需要同时访问某个共享资源,可以使用Semaphore来实现线程的同步和互斥。 Semaphore通常用于以下两种场景: 控制同时访问的线程数量:可以通过Semaphore的构
阅读全文
posted @ 2023-12-12 10:26 JohnnyLei
阅读(74)
评论(0)
推荐(0)
2023年12月7日
wpf 颜色转换常用方法
摘要: 设置颜色: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
阅读(411)
评论(0)
推荐(1)
2023年11月28日
wpf 封装 时间日期 双向绑定 输入框 控件
摘要: 简单封装一个时间日期 输入框 DateTimePicker.xaml <UserControl x:Class="FullApp5DateTimePicker.Modules.ModuleName.Views.DateTimePicker" xmlns="http://schemas.microso
阅读全文
posted @ 2023-11-28 16:21 JohnnyLei
阅读(543)
评论(0)
推荐(0)
2023年11月25日
wpf mediaplayer 播放mp3音乐
摘要: 方式1 直接播放指定路径 private DelegateCommand _PlaySoundCommand; public DelegateCommand PlaySoundCommand => _PlaySoundCommand ?? (_PlaySoundCommand = new Deleg
阅读全文
posted @ 2023-11-25 11:20 JohnnyLei
阅读(460)
评论(0)
推荐(1)
2023年11月24日
C# 使用 HttpClient 模拟一次网页Get请求 大麦
摘要: 查看网页get的请求 fiddler 查看一次请求参数 请求方法 HttpClientHandler handler = new HttpClientHandler() { UseCookies = false, AutomaticDecompression = DecompressionMetho
阅读全文
posted @ 2023-11-24 15:40 JohnnyLei
阅读(471)
评论(0)
推荐(0)
2023年11月15日
C# 开发浏览器拓展工具
摘要: 1、安装Blazor.BrowserExtension.Template模板 dotnet new --install Blazor.BrowserExtension.Template 2、新建项目 dotnet new browserext --name 你的项目名称 3、修改代码 4、运行程序
阅读全文
posted @ 2023-11-15 10:16 JohnnyLei
阅读(228)
评论(0)
推荐(0)
2023年11月6日
wpf 记一次诡异的PreviewMouseLeftButtonDown 无法触发问题
摘要: 1、原始代码 <Grid > <i:Interaction.Triggers> <i:EventTrigger EventName="PreviewMouseLeftButtonDown"> <i:InvokeCommandAction Command="{Binding DataContext.M
阅读全文
posted @ 2023-11-06 17:12 JohnnyLei
阅读(475)
评论(0)
推荐(1)
2023年10月27日
wpf Interaction Triggers 绑定任意方法、任意Command
摘要: framework版本引入命名空间 通过在代码中引入System.Windows.Interactivity.dll,引入了这个dll后我们就能够使用这个里面的方法来将事件映射到ViewModel层了,我们来看看具体的使用步骤,第一步就是引入命名控件 xmlns:i="clr-namespace:S
阅读全文
posted @ 2023-10-27 09:45 JohnnyLei
阅读(3511)
评论(0)
推荐(0)
2023年9月24日
AutoResetEvent
摘要: 表示线程同步事件在一个等待线程释放后收到信号时自动重置。 此类不能被继承。 以下示例演示如何在AutoResetEventSet每次用户按 Enter 键时调用基类上的 方法 () 一次释放一个线程。 该示例启动三个 AutoResetEvent 线程,等待在信号状态下创建的 。 第一个线程会立即释
阅读全文
posted @ 2023-09-24 23:35 JohnnyLei
阅读(55)
评论(0)
推荐(0)
ManualResetEvent
摘要: 表示线程同步事件,收到信号时,必须手动重置该事件。 此类不能被继承。 该示例以 ManualResetEvent 处于未对齐状态的 开头, (即 传递到 false 构造函数) 。 该示例创建三个线程,其中每个线程通过调用 其 WaitOne 方法在 上ManualResetEvent阻止。 当用户
阅读全文
posted @ 2023-09-24 23:33 JohnnyLei
阅读(47)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告