摘要: 类似【第1章 第 1 章】只保留一个【第1章】 //这个写法可以调试 content = Regex.Replace(content, "\n\n第\\d章(?<chapter>.*第.*\\d.*章)\n\n", (o) => { return o.Value.Replace(o.Groups[" 阅读全文
posted @ 2023-07-26 14:35 户的博客 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 最简单在MainWindow.xaml设置,字体 FontFamily,字号 FontSize <Window x:Class="TestWpf.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 阅读全文
posted @ 2023-07-25 13:05 户的博客 阅读(978) 评论(0) 推荐(0) 编辑
摘要: IsMouseOver鼠标经过时,IsPressed鼠标点击时 <Style TargetType="{x:Type Button}"> <Setter Property="Foreground" Value="White" /> <Setter Property="Background" Valu 阅读全文
posted @ 2023-07-22 21:43 户的博客 阅读(1068) 评论(0) 推荐(0) 编辑
摘要: 新建时是 WPF应用程序 的程序,框架 .NET 6 xaml中 <TextBox x:Name="txt" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" AcceptsReturn="True"></TextBox> AcceptsR 阅读全文
posted @ 2023-07-22 11:26 户的博客 阅读(58) 评论(0) 推荐(0) 编辑
摘要: teechart收费,这里用测试的。(一开始不知道收费的,在nuget里搜索有就安装了,结果页面上有购买提示) 新建一个winform .net framework项目,nuget程序包中安装teechart 添加一个teechart控件 添加完以后这样的(页面上 This is an EVALUA 阅读全文
posted @ 2023-07-05 15:31 户的博客 阅读(491) 评论(0) 推荐(0) 编辑
摘要: 一个网站返回的response,CharacterSet = "gb2312",读取时编码用了Encoding.GetEncoding("gb2312"),转成字符串后乱码,然后发现ContentEncoding = "gzip",搜索以后这个格式是压缩过的 https://www.cnblogs. 阅读全文
posted @ 2023-05-13 21:49 户的博客 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 安装要求(https://www.opencascade.com/components/cad-simplification-component/) 下载地址:https://dev.opencascade.org/release 截图如下(从 https://dev.opencascade.org 阅读全文
posted @ 2023-05-09 17:00 户的博客 阅读(1487) 评论(0) 推荐(0) 编辑
摘要: img_backpic.Source = new BitmapImage(new Uri(path, UriKind.RelativeOrAbsolute)); UriKind有3种类型:RelativeOrAbsolute/Absolute/Relative,这里测试用了RelativeOrAbs 阅读全文
posted @ 2022-12-30 16:59 户的博客 阅读(266) 评论(0) 推荐(1) 编辑
摘要: 有一个功能需要在后台修改App.xaml中的<Application.Resources>的Style App.xaml中如下 <Style x:Key="firstColor" TargetType="Border"> <Setter Property="Background" Value="{D 阅读全文
posted @ 2022-12-30 16:41 户的博客 阅读(807) 评论(0) 推荐(1) 编辑
摘要: 根据类名获取Type 有用到一个方法参数是Type type,这里知道类名,找了两个方法 方法一(已测试): typeof(ClassName); 方法二(未测试): System.Reflection.Assembly.Load("程序集名称").GetType("FullClassName"); 阅读全文
posted @ 2022-12-30 16:16 户的博客 阅读(395) 评论(0) 推荐(0) 编辑