上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: 打开一个页面,并获取这个页面传回的值 this.DialogResult = DialogResult.OK; 如果点击右上角的X,那么会传回 DialogResult.Cancel public partial class passwordcheck : Form { public passwor 阅读全文
posted @ 2021-09-13 18:12 zq爱生活爱代码 阅读(351) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/m0_37879526/article/details/109962340 我在CSDN上的博客,这里再补充一个 ReaderWriterLockSlim 读写锁 其实 ReaderWriterLockSlim 与 ReaderWriterLock 比较像 阅读全文
posted @ 2021-09-08 19:10 zq爱生活爱代码 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 注意 Method 3需要一个参数,即Method 1的返回类型。在这里,await关键字对于等待Method 1任务的完成起着至关重要的作用。 static void Main(string[] args) { Console.OutputEncoding = Encoding.UTF8; cal 阅读全文
posted @ 2021-09-08 10:42 zq爱生活爱代码 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 基本用法 注意 异步方法 必须要有 async 标记,内部 异步 对象 也要有 await 标记 static void Main(string[] args) { Console.OutputEncoding = Encoding.UTF8; //callMethod(); Method1(); 阅读全文
posted @ 2021-09-08 09:55 zq爱生活爱代码 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 与其他多线程相比,Task 可以 返回 异步执行后的结果。根据结果,我们来进一步编程 static void Main(string[] args) { Console.OutputEncoding = Encoding.UTF8; //callMethod(); Method4(); Consol 阅读全文
posted @ 2021-09-08 08:23 zq爱生活爱代码 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Interlocked.Increment 递增 Interlocked.Decrement 递减 returnvalue = Interlocked.Exchange(ref valuie1, valuie2); // 将 value2 值给 covaluie1unt,然后返回 value1 中原 阅读全文
posted @ 2021-09-06 20:41 zq爱生活爱代码 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1.1 基本 Trigger <Window.Resources> <Style TargetType="{x:Type CheckBox}"> <Style.Triggers> <Trigger Property="IsChecked" Value="true"> <Setter Property 阅读全文
posted @ 2021-09-05 17:15 zq爱生活爱代码 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 點擊會默認選擇這一行,但是如果點擊這一列使用了contentTemplate,則不會 <Window x:Class="WpfDemo.HierarchicalDataTemplateDemo1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml 阅读全文
posted @ 2021-09-05 16:44 zq爱生活爱代码 阅读(69) 评论(0) 推荐(0) 编辑
摘要: ControlTemplate 和 DataTemplate 都是派生自FrameworkTemplate, 这个类有 FindName 方法 访问内部的控件 也就是说只有我们获得了Template 就可以访问内部控件。 对于ControlTemplate,访问控件的Template属性即可。但是对 阅读全文
posted @ 2021-08-30 19:56 zq爱生活爱代码 阅读(67) 评论(0) 推荐(0) 编辑
摘要: 注意 HierarchicalDataTemplate 作用的目标是 MenuItem的 Header <Window x:Class="WpfDemo.HierarchicalDataTemplateDemo1" xmlns="http://schemas.microsoft.com/winfx/ 阅读全文
posted @ 2021-08-28 05:33 zq爱生活爱代码 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页