摘要: --DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 取当前年月日时分秒 currentTime=System.DateTime.Now; 取当前年 int 年=currentTime.Year; 取当前月 int 月=c 阅读全文
posted @ 2018-11-13 14:07 liu_xh 阅读(5228) 评论(0) 推荐(0) 编辑
摘要: string dir = AppDomain.CurrentDomain.BaseDirectory + "Video"; if (!System.IO.Directory.Exists(dir)) { System.IO.Directory.CreateDirectory(dir); } Dire 阅读全文
posted @ 2018-11-07 14:44 liu_xh 阅读(320) 评论(0) 推荐(0) 编辑
摘要: ABP 3.7 3.8版本升级后迁移数据库,报错未能加载文件或程序集“Castle.Core, Version=4.0.0.0”,System.ComponentModel.Annotations也可能提示4.0.0.0版本无法加载,处理方法一致。 Castle.Core使用的4.3.1版本 解决方 阅读全文
posted @ 2018-10-08 16:21 liu_xh 阅读(499) 评论(0) 推荐(0) 编辑
摘要: 同事开发过程中,读写摄像头遇到的问题。 在录制和取消反复切换就会报内存越界的错误,这是由于open和close没有线程同步造成的。 参考如下文章得到了解决思路,最后Open和Close用一个静态锁解决了问题。 https://blog.csdn.net/liang12360640/article/d 阅读全文
posted @ 2018-09-27 15:38 liu_xh 阅读(1860) 评论(0) 推荐(0) 编辑
摘要: <DataGridTemplateColumn Header="设备状态" IsReadOnly="True" Width="150"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <!--<TextBlock HorizontalAli 阅读全文
posted @ 2018-09-14 11:34 liu_xh 阅读(913) 评论(0) 推荐(0) 编辑
摘要: 1 public enum EnumPagerAction 2 { 3 /// 4 /// 移动到首页 5 /// 6 MoveHomePage, 7 8 /// 9 /// 移动到上一页 10 /// 11 MovePrevious... 阅读全文
posted @ 2018-09-09 10:09 liu_xh 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 然后打开web程序,访问ip:port/Help. 为什么可以直接输入Help就能访问呢,因为这个插件本身已经配置了路径,如下。 阅读全文
posted @ 2018-08-22 15:34 liu_xh 阅读(655) 评论(0) 推荐(0) 编辑
摘要: 这次做项目,负责开发web api。 自己给自己挖了个坑。在所有的api接口前面都加上一个static 。 结果检查路由配置、代码等等都找不到问题所在。 最后在一个同事的提醒下,原来是static给惹得锅。 特此记录,也分享给后来遇到这个问题的童鞋 阅读全文
posted @ 2018-08-17 09:10 liu_xh 阅读(235) 评论(0) 推荐(0) 编辑
摘要: ListUserInfo.Remove(ListUserInfo.FirstOrDefault(u => u.UserName == userInfo.UserName)); ListUserInfo是一个集合 阅读全文
posted @ 2018-08-16 16:13 liu_xh 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 1、若datagrid绑定的数据源是同一个的话,即使里面的数据不同。页面也不会刷新,则需要重置数据源,再绑定。处理如下: datagrid1.ItemsSource=ListModule; 若ListModule里面的数据改变了,重新绑定后。 datagrid1.ItemsSource=ListMo 阅读全文
posted @ 2018-08-16 14:49 liu_xh 阅读(3125) 评论(0) 推荐(2) 编辑