摘要: 将Windows服务作为Web API的服务端,需要实现一个Web API控制器,并将其集成到Windows服务中。以下是一些基本步骤: 在您的Windows服务项目中创建一个新的Web API控制器。您可以使用Visual Studio的类库模板来创建一个空的Web API项目,然后将控制器添加到 阅读全文
posted @ 2023-08-28 18:23 JerrySky 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1、设置CheckBox,FontSize,只有字体发生变化,前面的勾选框太小,可以设置 LayoutTransform <Style TargetType="CheckBox"> <Setter Property="HorizontalAlignment" Value="Left"/> <Sett 阅读全文
posted @ 2023-07-14 14:02 JerrySky 阅读(1743) 评论(0) 推荐(0) 编辑
摘要: 1、添加应用程序清单文件 2、requestedExecutionLevel 节点,level属性修改为“requireAdministrator” <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> 阅读全文
posted @ 2023-07-13 13:59 JerrySky 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 使用示例: <Window.Resources> <Style x:Key="radioButtonStyle" TargetType="{x:Type ListBox}"> <Setter Property="ItemContainerStyle"> <Setter.Value> <Style T 阅读全文
posted @ 2022-08-12 10:21 JerrySky 阅读(166) 评论(0) 推荐(0) 编辑
摘要: (1)csproj文件添加 <UseWindowsForms>true</UseWindowsForms> 如图: 添加前后框架对比 (2)WPF窗口引入命名空间 xmlns:wfh="clr-namespace:System.Windows.Forms.Integration;assembly=W 阅读全文
posted @ 2022-01-17 09:16 JerrySky 阅读(799) 评论(0) 推荐(0) 编辑
摘要: 读取.xls文件到DataSet 导出DataTable到.xls格式,如果是.xlsx将代码中HSS改为XSS 首先引入NPOI /// <summary> /// DataTable导出到Excel文件 .xls格式 /// </summary> /// <param name="dtSourc 阅读全文
posted @ 2019-02-19 10:12 JerrySky 阅读(496) 评论(0) 推荐(0) 编辑
摘要: void Base64StringToImage(string imgCode) { try { String inputStr = imgCode; byte[] arr = Convert.FromBase64String(inputStr); ... 阅读全文
posted @ 2019-01-30 12:01 JerrySky 阅读(1361) 评论(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 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 获取: 需要引用 阅读全文
posted @ 2019-01-30 11:53 JerrySky 阅读(229) 评论(0) 推荐(0) 编辑
摘要: /// /// MD5加密 /// /// 需要加密的参数 /// 返回16位小写字符串 public static string GetMd5Hash(String input) { if (input == null) { ... 阅读全文
posted @ 2019-01-30 11:44 JerrySky 阅读(1605) 评论(0) 推荐(0) 编辑