会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
JerrySky
Remember, you're the one who can fill the world with sunshine.
博客园
首页
新随笔
联系
订阅
管理
2023年8月28日
Windows服务作为Web API的服务端
摘要: 将Windows服务作为Web API的服务端,需要实现一个Web API控制器,并将其集成到Windows服务中。以下是一些基本步骤: 在您的Windows服务项目中创建一个新的Web API控制器。您可以使用Visual Studio的类库模板来创建一个空的Web API项目,然后将控制器添加到
阅读全文
posted @ 2023-08-28 18:23 JerrySky
阅读(371)
评论(0)
推荐(0)
2023年7月14日
WPF CheckBox勾选框大小设置
摘要: 1、设置CheckBox,FontSize,只有字体发生变化,前面的勾选框太小,可以设置 LayoutTransform <Style TargetType="CheckBox"> <Setter Property="HorizontalAlignment" Value="Left"/> <Sett
阅读全文
posted @ 2023-07-14 14:02 JerrySky
阅读(3671)
评论(0)
推荐(0)
2023年7月13日
管理员权限启动WPF应用程序
摘要: 1、添加应用程序清单文件 2、requestedExecutionLevel 节点,level属性修改为“requireAdministrator” <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
阅读全文
posted @ 2023-07-13 13:59 JerrySky
阅读(417)
评论(0)
推荐(0)
2022年8月12日
WPF,Style中取父控件的属性值
摘要: 使用示例: <Window.Resources> <Style x:Key="radioButtonStyle" TargetType="{x:Type ListBox}"> <Setter Property="ItemContainerStyle"> <Setter.Value> <Style T
阅读全文
posted @ 2022-08-12 10:21 JerrySky
阅读(210)
评论(0)
推荐(0)
2022年1月17日
.Net5 WPF 使用 WindowsFormsHost
摘要: (1)csproj文件添加 <UseWindowsForms>true</UseWindowsForms> 如图: 添加前后框架对比 (2)WPF窗口引入命名空间 xmlns:wfh="clr-namespace:System.Windows.Forms.Integration;assembly=W
阅读全文
posted @ 2022-01-17 09:16 JerrySky
阅读(1116)
评论(0)
推荐(0)
2019年2月19日
C#解压文件,Excel操作
摘要: 读取.xls文件到DataSet 导出DataTable到.xls格式,如果是.xlsx将代码中HSS改为XSS 首先引入NPOI /// <summary> /// DataTable导出到Excel文件 .xls格式 /// </summary> /// <param name="dtSourc
阅读全文
posted @ 2019-02-19 10:12 JerrySky
阅读(515)
评论(0)
推荐(0)
2019年1月30日
将base64转为图片
摘要: void Base64StringToImage(string imgCode) { try { String inputStr = imgCode; byte[] arr = Convert.FromBase64String(inputStr); ...
阅读全文
posted @ 2019-01-30 12:01 JerrySky
阅读(1405)
评论(0)
推荐(0)
字符串十六进制的转换
摘要: // 字符串到十六进制 public static string ToHex(string s, string charset, bool fenge) { if ((s.Length % 2) != 0) { s += " ";//空格 //thro...
阅读全文
posted @ 2019-01-30 11:56 JerrySky
阅读(481)
评论(0)
推荐(0)
配置文件添加读取节点
摘要: 获取: 需要引用
阅读全文
posted @ 2019-01-30 11:53 JerrySky
阅读(243)
评论(0)
推荐(0)
C#MD5加密
摘要: /// /// MD5加密 /// /// 需要加密的参数 /// 返回16位小写字符串 public static string GetMd5Hash(String input) { if (input == null) { ...
阅读全文
posted @ 2019-01-30 11:44 JerrySky
阅读(1613)
评论(0)
推荐(0)
下一页
公告