摘要: 1、需要知道自己电脑上的Edge版本 打开Edge->设置->关于Microsoft Edge2、到官网下载对应版本的Edge https://www.microsoft.com/en-us/edge/business/download3、双击安装,等待安装完成(这里不能直接右键卸载)4、右键安装包 阅读全文
posted @ 2020-11-23 11:44 火星撞鸡蛋 阅读(471) 评论(1) 推荐(0) 编辑
摘要: WebBrowser 获取Cookie 1.string cookieStr = WebBrowser.Document.Cookie;//获取不全 2. [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)] 阅读全文
posted @ 2021-11-18 12:58 火星撞鸡蛋 阅读(229) 评论(0) 推荐(0) 编辑
摘要: DateTime dt_now = DateTime.Now;//获取当前时间 while (dt_now.AddMinutes(1) > DateTime.Now) { //Todo:执行自己的操作 await Task.Delay(1000);//延迟1s } View Code 相对比较优雅一 阅读全文
posted @ 2021-03-30 10:10 火星撞鸡蛋 阅读(928) 评论(1) 推荐(0) 编辑
摘要: 需求比较两个DateTime类型的年月 类似:只能是当月或当月之前的数据(只能是1号) 思路:将两个需要对比的日期 全部转换成月份 再做比较 如:DateTime dt_Now=new DateTime.Now(); string dt_other="2020-03-02"; DateTime ot 阅读全文
posted @ 2021-03-12 15:40 火星撞鸡蛋 阅读(1575) 评论(0) 推荐(0) 编辑
摘要: 环境:Window10 VS2015 .net版本 异常信息:发生了 NonComVisibleBaseClass其他信息: 执行了 QueryInterface 调用,请求提供 COM 可见的托管类“MS.Internal.AutomationProxies.WindowsEditBox”的类接口 阅读全文
posted @ 2020-11-05 15:33 火星撞鸡蛋 阅读(516) 评论(0) 推荐(0) 编辑
摘要: 本来想找个类似360强力粉碎的demo 无果~ 找来找去都是同一个批处理脚本 效果也不理想,记录一下吧 正文: 1、新建文本.txt 2、文本内容 DEL /F /A /Q \\?\%1RD /S /Q \\?\%1 3、保存文本 4、后缀名修改 .txt >.bat 直接拖动需要删除的文件或文件夹 阅读全文
posted @ 2020-10-15 10:33 火星撞鸡蛋 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 之前只知道Process 可以直接打开指定文件 新增知识->定位指定文件 不执行打开操作System.Diagnostics.Process.Start("explorer.exe", "/select, " +path);//注意第二个参数格式/select,空格+路径参数:explorer.ex 阅读全文
posted @ 2020-10-13 11:05 火星撞鸡蛋 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 环境: window10 框架:4.5.2 由于 windows10的DPI设置 无法直接获取屏幕的真实长宽 获取长宽代码 int iH = Screen.PrimaryScreen.Bounds.Height; int iW = Screen.PrimaryScreen.Bounds.Width; 阅读全文
posted @ 2020-10-12 13:33 火星撞鸡蛋 阅读(2679) 评论(1) 推荐(0) 编辑
摘要: 新特性1、List? //取第一个元素 List<string> list = null; //正常写法 if (list != null && list.Count() > 0) { string sFirst = list[0]; } //新特性 string firstX = list?[0] 阅读全文
posted @ 2020-08-31 17:31 火星撞鸡蛋 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 为什么要用线程池? 不需要重复新开销毁线程 环境: vs 2015 .net 4.5.2 输出环境:控制台应用程序 贴代码: class Program { static int workerThreads;//线程池中辅助线程的最大数目 static int completionPortThrea 阅读全文
posted @ 2020-08-04 17:10 火星撞鸡蛋 阅读(247) 评论(0) 推荐(0) 编辑