随笔分类 -  基础

摘要:1、DLL中默认无法使用自己DLL中的资源,用的都是 exe中的资源,如下设置 就可以使用 DLL中的资源了: <Image Source="/VideoDLL;component/Images/icon/关闭 拷贝 4.png" /> ZC:"/Images/icon/关闭 拷贝 4.png" 是 阅读全文
posted @ 2020-07-27 14:08 csskill 阅读(503) 评论(0) 推荐(0)
摘要:1、Visual C# 制作DLL文件 - Develop - 博客园.html(https://www.cnblogs.com/develop/p/3542285.html) 2、类库中添加 WPF窗口 C# Dll中集成WPF窗体踩的坑_小数点儿的博客-CSDN博客_$(msbuildtools 阅读全文
posted @ 2020-07-21 15:35 csskill 阅读(486) 评论(0) 推荐(0)
摘要:1、使用的是 Newtonsoft.Json; (vs2017) 1.1、无需手动从NuGet安装。我在 "引入"里面也没有找到它... 我的使用方式是这样: 随便使用 Newtonsoft.Json的类,然后报错时这样操作: 2、Newtonsoft.Json高级用法 1.忽略某些属性 2.默认值 阅读全文
posted @ 2020-07-21 14:26 csskill 阅读(120) 评论(0) 推荐(0)
摘要:1、需求:DataGrid中某一个列绑定的是一个bool型的类成员,需要根据这个bool型的 true/false 显示 是/否 2、网上资料: 2.1、WPF的DataGrid的某个列绑定数据的三种方法(Binding、Converter、DataTrigger) - DotNet之路 - 博客园 阅读全文
posted @ 2020-06-05 11:09 csskill 阅读(2179) 评论(0) 推荐(0)
摘要:1、正确处理WPF中Slider值改变事件的方式 - llyn23 - 博客园.html(https://www.cnblogs.com/llyn23/p/3852468.html) WPF有个万能的添加事件处理程序 的方法:AddHandler,使用示例:Slider1.AddHandler(Sl 阅读全文
posted @ 2020-05-27 15:16 csskill 阅读(1689) 评论(0) 推荐(0)
摘要:1、c# 获取当前程序所在路径 - $JackChen - 博客园.html(https://www.cnblogs.com/Again/p/7700218.html) 暂时用这个: //获取和设置当前目录(即该进程从中启动的目录)的完全限定路径。 string str3 = System.Envi 阅读全文
posted @ 2020-04-27 10:10 csskill 阅读(537) 评论(0) 推荐(0)
摘要:1、SortedDictionary<string, SelfTestInfo> sd = new SortedDictionary<string, SelfTestInfo>();// ZC: 只添加,不删除 2、 3、 4、 5、 阅读全文
posted @ 2020-04-27 09:00 csskill 阅读(188) 评论(0) 推荐(0)
摘要:1、C#写入文件的几种方式 - Researcher - 博客园.html(https://www.cnblogs.com/researcher/p/4989395.html) 网页内容保存: 1. FileStream.Write string filePath = Directory.GetCu 阅读全文
posted @ 2020-04-12 14:54 csskill 阅读(4091) 评论(0) 推荐(0)
摘要:1、网上搜到的一般的都好繁琐,偶尔搜到了这个简单: private void Click_CMD(object sender, RoutedEventArgs e) { //ProcessStartInfo start = new ProcessStartInfo(@"C:\Users\33\Des 阅读全文
posted @ 2020-04-09 23:28 csskill 阅读(616) 评论(0) 推荐(0)
摘要:ZC:内容较多,感觉怪麻烦的 ZC:暂时使用的:(1)、string label = string.Format("{0:N2}", 浮点数值);(":"前面的"0" 是参数的序号,":"后面的"N2"表示保留2位小数) 1、 2、参考网址:string.Format对C#字符串格式化 - itje 阅读全文
posted @ 2020-03-23 10:17 csskill 阅读(1903) 评论(0) 推荐(1)
摘要:1、 2、 3、 4、 5、 阅读全文
posted @ 2019-10-12 15:44 csskill 阅读(137) 评论(0) 推荐(0)
摘要:1、ZC:这个 测试试下来,确认:二维数组是这样的定义方式:[行数, 列数] 1.1、测试代码: 1.2、控制台打印: 1.3、断点: 2、 3、 4、 5、 阅读全文
posted @ 2019-10-11 13:16 csskill 阅读(216) 评论(0) 推荐(0)
摘要:1、来自:WPF如何快速的画大量图形,比如10万条线?-CSDN论坛.html(https://bbs.csdn.net/topics/391042368?list=982381) 2、 3、 4、 5、 阅读全文
posted @ 2019-09-25 10:46 csskill 阅读(378) 评论(0) 推荐(0)
摘要:1、暂时使用如下2个方式:(20190830) Application.Current.Shutdown(); System.Environment.Exit(0); ZC:不知道为何 WPF的程序在 任务栏 右击 关闭的时候 就是关不了... 暂时未找到原因,这是 没办法时的权宜之计... 2、 阅读全文
posted @ 2019-08-30 17:01 csskill 阅读(457) 评论(0) 推荐(0)
摘要:1、WPF 中添加winform 窗体 - 不是我的博客 - CSDN博客.html(https://blog.csdn.net/u011854789/article/details/54668859) 1.1、 ZC:假设 WPF工程为 A工程,WinForm工程为 B工程。 System.Win 阅读全文
posted @ 2019-08-21 13:57 csskill 阅读(2248) 评论(0) 推荐(0)
摘要:1、ZC:我现在(20190717)查到的 有2中方式画 箭头:(1)在 System.Windows.Controls.Canvas中绘制;(2)在 Graphics上绘制 2、在 System.Windows.Controls.Canvas中绘制 2.1、使用WPF创建画图箭头 - NET未来之 阅读全文
posted @ 2019-07-17 09:58 csskill 阅读(241) 评论(0) 推荐(0)
摘要:1、C# 定时器的使用 System.Windows.Forms.Timer,System.Timers.Timer,System.Threading.Timer - 从_零_开始的专栏 - CSDN博客.html(https://blog.csdn.net/m1654399928/article/ 阅读全文
posted @ 2019-07-16 16:49 csskill 阅读(421) 评论(0) 推荐(0)
摘要:1、c# 等待事件触发 类似c++的WaitForSingleObject()_百度知道.html(https://zhidao.baidu.com/question/1539843583632581347.html) 2、ZC:搜索:"ManualResetEvent"、"AutoResetEve 阅读全文
posted @ 2019-07-12 16:06 csskill 阅读(5864) 评论(0) 推荐(0)
摘要:1、ZC:注意,需要 "using System.Linq;" 才能这样用 2、测试代码: 3、 4、 5、 阅读全文
posted @ 2019-07-11 10:49 csskill 阅读(344) 评论(0) 推荐(0)