月夜钓钱江鱼

醉后不知天在水,满船清梦压星河。
摘要: 1 /// <summary> 2 /// ping 域名地址是否通畅 3 /// </summary> 4 /// <returns></returns> 5 public async static Task<bool> PingAsync(string ip, int timeout = 500 阅读全文
posted @ 2023-04-10 16:38 湘灵 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1 public App() 2 { 3 ShutdownMode = System.Windows.ShutdownMode.OnMainWindowClose; 4 5 App.Current.DispatcherUnhandledException += new DispatcherUnhan 阅读全文
posted @ 2023-04-10 16:26 湘灵 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 打印过程中,获取可见的实际宽度作为打印,就没有收缩的了,图片收缩放大是模糊的原因之一,所以所见所得就是最好的方法 1 private void printDocNew_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArg 阅读全文
posted @ 2023-04-04 22:32 湘灵 阅读(83) 评论(0) 推荐(0) 编辑
摘要: using System; using System.ComponentModel; using System.Runtime.InteropServices; namespace SKII.SKIITimer { /// <summary> /// 相差2,3毫秒 /// </summary> p 阅读全文
posted @ 2023-03-11 10:32 湘灵 阅读(127) 评论(0) 推荐(0) 编辑
摘要: BindingList<VideoInfo> VideoPlayList = null;//定义 VideoPlayList = new BindingList<VideoInfo>(AppManager.CreateInstance().PlayList.VideoList);//List<T>绑 阅读全文
posted @ 2023-03-10 16:15 湘灵 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 1 /// <summary> 2 /// 耗时计数器 3 /// </summary> 4 public class ElapsedTimer 5 { 6 // 创建时默认为创建时间,这样不调用 Start 也可以 7 private DateTime _StartTime = DateTime. 阅读全文
posted @ 2022-12-12 11:17 湘灵 阅读(1981) 评论(0) 推荐(0) 编辑
摘要: /// 清除容器里面某些控件的值 /// </summary> /// <param name="parContainer">容器类控件</param> public void ClearCntrValue(Control parContainer) { for (int index = 0; in 阅读全文
posted @ 2022-11-28 16:20 湘灵 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 近日,想在自己的软件简单控制其它软件的最大化最小化,想到直接向进程发送指令,结果一直无效,经过Spy++发现,原来快捷方式在子窗体上,所以需要遍历子窗体在发送指令,以下为参考代码: 1 [DllImport("user32.dll", SetLastError = true)] 2 public s 阅读全文
posted @ 2022-10-20 09:54 湘灵 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 话不多说,直接上代码: import time import numpy as np import face_recognition import cv2 # import mediapipe as mp video_capture = cv2.VideoCapture(0) video_captu 阅读全文
posted @ 2022-04-18 17:00 湘灵 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 今天在使用JSON序列化类时出现问题,原来类中有一个接口,在反序列化时不知道接口的实体是什么 public class Device : IComparer { private string _deviceid; private string _devicename; private string 阅读全文
posted @ 2019-01-23 23:29 湘灵 阅读(1226) 评论(0) 推荐(0) 编辑