上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 1. 与 Task.Run() 的区别; 先看一下源码: public class Task : IThreadPoolWorkItem, IAsyncResult, IDisposable { public static Task Run(Action action) { StackCrawlMa 阅读全文
posted @ 2021-03-11 12:24 鑫茂 阅读(1800) 评论(0) 推荐(0) 编辑
摘要: IEnumerable<int> intList = Enumerable.Range(1, 15); foreach (int i in intList) { ThreadPool.QueueUserWorkItem(w => { Console.WriteLine("ThreadPool:" + 阅读全文
posted @ 2021-03-11 12:20 鑫茂 阅读(135) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2020.cnblogs.com/blog/1020027/202103/1020027-20210309192522741-723428598.png) 阅读全文
posted @ 2021-03-11 12:14 鑫茂 阅读(139) 评论(0) 推荐(1) 编辑
摘要: 引用:LiveCharts,LiveCharts.Wpf 1. 示例 折线图 <Window ... xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"> <lvc:CartesianChart> //折线 <lvc:Ca 阅读全文
posted @ 2021-03-11 12:13 鑫茂 阅读(657) 评论(0) 推荐(0) 编辑
摘要: 1. 使用 Winform 的 PictureBox 1.1 引用 dll WindowsFormsIntegration.dll System.Windows.Forms.dll System.Drawing.dll 1.2 XMAl代码 <Window x:Class="TestGif.Main 阅读全文
posted @ 2021-03-08 21:55 鑫茂 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 以下 F:/Debug/xx.exe 为客户端路径。 1. Web 调用 1.1 IE 内核的浏览器调用方式 js 函数调用如下: var a=new ActiveXObject("Wscript.Shell"); a.exec("F:/Debug/xx.exe params");(格式是:exe 阅读全文
posted @ 2021-03-08 21:47 鑫茂 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1. base64 转图片 将 base64 转成 byte[] 将 byte[] 作为内存流保存到一个 BitmapImage 实例的流的源 把 BitmapImage 作为目标图片的 Source byte[] streamBase = Convert.FromBase64String(imag 阅读全文
posted @ 2021-03-08 21:46 鑫茂 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 1. 功能 系统截图。 2. 实现 2.1 思路 控件继承自 System.Windows.Media.Visual, 通过 System.Windows.Media.Imaging.RenderVisualToBitmap 把 Visual 对象转换为位图 rtb 将位图转成编码器接受的一帧,类型 阅读全文
posted @ 2021-03-08 21:45 鑫茂 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 1. 前提 原本是在大屏上展示系统,系统有个功能是加载第三方的网站,第三方网站按照大屏的分辨率写死了宽高; 现需要改到小屏展示系统,而这个第三方的网站不能随着 WebBrowser 窗口的尺寸调整网站内容的尺寸。 2. 解决思路 1)加载完毕后,调用 InvokeScript 方法执行在当前加载的文 阅读全文
posted @ 2021-03-08 21:43 鑫茂 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1. 拖拽窗体 使用 System.Windows.Window 自带的 DragMove() 方法即可识别窗体拖动。 DragMove(); 2. 拖拽控件:复制、移动控件 <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> 阅读全文
posted @ 2021-03-08 21:41 鑫茂 阅读(797) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页