会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
户的博客
博客园
首页
新随笔
联系
订阅
管理
2023年7月26日
c# 正则表达式 替换重复文字
摘要: 类似【第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:34 户的博客
阅读(266)
评论(0)
推荐(0)
2023年7月25日
WPF设置字体和字号
摘要: 最简单在MainWindow.xaml设置,字体 FontFamily,字号 FontSize <Window x:Class="TestWpf.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
阅读全文
posted @ 2023-07-25 13:04 户的博客
阅读(2185)
评论(0)
推荐(0)
2023年7月22日
wpf的button设置鼠标经过时的背景色 IsMouseOver
摘要: IsMouseOver鼠标经过时,IsPressed鼠标点击时 <Style TargetType="{x:Type Button}"> <Setter Property="Foreground" Value="White" /> <Setter Property="Background" Valu
阅读全文
posted @ 2023-07-22 21:42 户的博客
阅读(1796)
评论(0)
推荐(0)
TextBox定位到指定文字处
摘要: 新建时是 WPF应用程序 的程序,框架 .NET 6 xaml中 <TextBox x:Name="txt" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" AcceptsReturn="True"></TextBox> AcceptsR
阅读全文
posted @ 2023-07-22 11:25 户的博客
阅读(133)
评论(0)
推荐(0)
2023年7月5日
winform teechart甘特图、等高线图、热力图示例
摘要: teechart收费,这里用测试的。(一开始不知道收费的,在nuget里搜索有就安装了,结果页面上有购买提示) 新建一个winform .net framework项目,nuget程序包中安装teechart 添加一个teechart控件 添加完以后这样的(页面上 This is an EVALUA
阅读全文
posted @ 2023-07-05 15:30 户的博客
阅读(1077)
评论(0)
推荐(0)
2023年5月13日
c#关于Content-Encoding: gzip的读取方法
摘要: 一个网站返回的response,CharacterSet = "gb2312",读取时编码用了Encoding.GetEncoding("gb2312"),转成字符串后乱码,然后发现ContentEncoding = "gzip",搜索以后这个格式是压缩过的 https://www.cnblogs.
阅读全文
posted @ 2023-05-13 21:49 户的博客
阅读(538)
评论(0)
推荐(0)
2023年5月9日
opencascade下载安装
摘要: 安装要求(https://www.opencascade.com/components/cad-simplification-component/) 下载地址:https://dev.opencascade.org/release 截图如下(从 https://dev.opencascade.org
阅读全文
posted @ 2023-05-09 16:59 户的博客
阅读(3978)
评论(0)
推荐(0)
2022年12月30日
wpf后台设置image
摘要: img_backpic.Source = new BitmapImage(new Uri(path, UriKind.RelativeOrAbsolute)); UriKind有3种类型:RelativeOrAbsolute/Absolute/Relative,这里测试用了RelativeOrAbs
阅读全文
posted @ 2022-12-30 16:59 户的博客
阅读(305)
评论(0)
推荐(1)
wpf后台修改resource的style
摘要: 有一个功能需要在后台修改App.xaml中的<Application.Resources>的Style App.xaml中如下 <Style x:Key="firstColor" TargetType="Border"> <Setter Property="Background" Value="{D
阅读全文
posted @ 2022-12-30 16:41 户的博客
阅读(1033)
评论(0)
推荐(1)
c#根据类名获取类型
摘要: 根据类名获取Type 有用到一个方法参数是Type type,这里知道类名,找了两个方法 方法一(已测试): typeof(ClassName); 方法二(未测试): System.Reflection.Assembly.Load("程序集名称").GetType("FullClassName");
阅读全文
posted @ 2022-12-30 16:15 户的博客
阅读(685)
评论(0)
推荐(0)
下一页
公告