12 2021 档案

摘要:经过研究发现虚拟网卡应该是没有默认网关的,而且虚拟网卡的mac地址也有规律,所以根据默认网关和mac地址来进行判断是否为虚拟网卡 public static List<string> GetLocalIP() { List<string> IpList = new List<string>(); L 阅读全文
posted @ 2021-12-31 10:56 奇迹之耀 阅读(932) 评论(0) 推荐(0) 编辑
摘要:nuget包中引用HandyControl 在主窗体中引入xmlns:hc="https://handyorg.github.io/handycontrol" 在主窗体中加入代码 <Window.Resources> <ContextMenu x:Key="ContextMenu"> <MenuIt 阅读全文
posted @ 2021-12-29 10:37 奇迹之耀 阅读(851) 评论(0) 推荐(0) 编辑
摘要:在项目文件中添加 <Target Name="AfterResolveReferences"> <ItemGroup> <EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPat 阅读全文
posted @ 2021-12-29 10:33 奇迹之耀 阅读(188) 评论(0) 推荐(0) 编辑
摘要:首先在window窗体中设置属性ResizeMode="NoResize" 然后这个时候还可以在任务管理器中对程序进行最大化最小化 当触发最大化最小化事件时,进行拦截 前台代码 StateChanged="window_StateChanged" 后台代码 private void window_S 阅读全文
posted @ 2021-12-29 10:24 奇迹之耀 阅读(219) 评论(0) 推荐(0) 编辑
摘要:效果: <Window x:Class="WpfApp65.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winf 阅读全文
posted @ 2021-12-24 17:20 奇迹之耀 阅读(121) 评论(0) 推荐(0) 编辑
摘要:private bool HasScrollbar(TextBox TextBox) { bool HasScrollbar = false; List<Grid> list = FindVisualChild<Grid>(TextBox); foreach (var item in list) { 阅读全文
posted @ 2021-12-17 16:29 奇迹之耀 阅读(131) 评论(0) 推荐(0) 编辑
摘要:private void InsertText(RichTextBox tb, string text) { tb.CaretPosition.InsertTextInRun(text); if (tb.CaretPosition.LogicalDirection == LogicalDirecti 阅读全文
posted @ 2021-12-07 16:01 奇迹之耀 阅读(224) 评论(0) 推荐(0) 编辑
摘要:前台 <Window x:Class="hittest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/ 阅读全文
posted @ 2021-12-01 15:09 奇迹之耀 阅读(255) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示