摘要: AspectCore是一个很好的aop矿建,能够很好的支持async,我这边是使用autofac作为依赖注入容器, 在nuget上直接安装AspectCore.Extensions.Autofac,就可以使用了。 class Program { static async Task Main(stri 阅读全文
posted @ 2020-05-28 17:21 一!雨 阅读(909) 评论(0) 推荐(1) 编辑
摘要: 在netframework中,想将配置文件写入appdata特殊目录使用如下配置: <file type="log4net.Util.PatternString" value="%envFolderPath{ApplicationData}\\"></file> 但是当这个配置在netcore上时就 阅读全文
posted @ 2020-05-11 18:16 一!雨 阅读(513) 评论(0) 推荐(0) 编辑
摘要: 同样问题参照: https://stackoverflow.com/questions/18113597/wpf-handedness-with-popups 解决方案: 启动程序的时候调用下就可以了 阅读全文
posted @ 2019-10-31 10:52 一!雨 阅读(554) 评论(0) 推荐(0) 编辑
摘要: //设置控制面板中程序图标UninstallDisplayIcon={app}\logo.ico //设置控制面板中程序的名称Uninstallable=yesUninstallDisplayName={#MyAppName} 阅读全文
posted @ 2019-10-29 14:21 一!雨 阅读(3126) 评论(0) 推荐(0) 编辑
摘要: https://codeday.me/bug/20170902/65593.html 阅读全文
posted @ 2019-08-30 14:18 一!雨 阅读(539) 评论(0) 推荐(0) 编辑
摘要: private BitmapSource GetUiImage(FrameworkElement ui) { RenderTargetBitmap bmp=new RenderTargetBitmap((int)ui.ActualWidth,(int)ui.ActualHeight,96d,96d, 阅读全文
posted @ 2019-06-10 14:59 一!雨 阅读(2709) 评论(0) 推荐(0) 编辑
摘要: 使用RenderTargetBitmap渲染图片时,必须在需要渲染的控件外层包含一个border控件,不然渲染的图片返回就会出现问题。 如下: <Grid> <Grid.RowDefinitions> <RowDefinition Height="35" /> <RowDefinition /> < 阅读全文
posted @ 2019-06-10 10:04 一!雨 阅读(1288) 评论(0) 推荐(0) 编辑
摘要: 输出结果为:10 问题因该是??运算符没有-的优先级高,实际这个 操作等于: 解决这个问题的办法是提高??的优先级: 阅读全文
posted @ 2019-04-24 10:11 一!雨 阅读(212) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/Vblegend_2013/article/details/81771872 <Grid FocusManager.FocusedElement="{Binding ElementName=pwd}"> <Grid.RowDefinitions> <Row 阅读全文
posted @ 2019-04-18 17:29 一!雨 阅读(1604) 评论(0) 推荐(0) 编辑
摘要: 开发了一个wpf程序,需要管理员权限,设置了requireAdministrator 同时需要开机自启动,所以添加了注册表: 阅读全文
posted @ 2019-04-10 10:00 一!雨 阅读(2825) 评论(0) 推荐(0) 编辑