随笔分类 -  c#

摘要:/// <summary> /// 获取电脑 MAC地址 /// </summary> /// <param name="separator"></param> /// <returns></returns> public static List<string> GetActiveMacAddres 阅读全文
posted @ 2022-06-24 14:49 86727515 阅读(745) 评论(0) 推荐(0) 编辑
摘要:public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFilePr 阅读全文
posted @ 2022-05-24 17:13 86727515 阅读(202) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tas 阅读全文
posted @ 2022-05-04 21:59 86727515 阅读(1086) 评论(0) 推荐(0) 编辑
摘要:SplashScreen类为WPF应用程序提供启动屏幕。 方法一:设置图片属性 1. 添加启动图片到项目中 2. 设置图片属性的Build Action为SplashScreen 方法二:编写代码 1. 在App.xaml.cs中重写OnStartUp方法: using System; using 阅读全文
posted @ 2020-05-19 19:42 86727515 阅读(619) 评论(0) 推荐(0) 编辑
摘要:方法:如果是在Windows Server 2012本地控制台下,直接按Win(键盘上的微软徽标键)+R,输入:rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0回车后,勾选所需要的桌面图标的名称,确定即可。 阅读全文
posted @ 2020-04-03 09:39 86727515 阅读(13679) 评论(0) 推荐(0) 编辑
摘要:--- 使用字符串拼接id,title SELECT *, before = ( SELECT TOP 1 (convert(varchar(36),ContentId)+'|'+Title) as aa FROM Cms_Content WHERE CreateDate > ( SELECT CreateDate FROM Cms_Content WHERE ContentId... 阅读全文
posted @ 2019-09-24 14:55 86727515 阅读(753) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-09-11 17:10 86727515 阅读(1754) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace WindowsAPI { class CSharp_Win32Api { #region Us... 阅读全文
posted @ 2019-08-14 11:35 86727515 阅读(651) 评论(0) 推荐(0) 编辑
摘要:程序在32位操作系统上运行正常,在64位操作系统上运行读卡功能提示”试图加载格式不正确“。 点击项目属性,把目标平台Any CPU 设置为X86 阅读全文
posted @ 2019-08-14 10:10 86727515 阅读(479) 评论(0) 推荐(0) 编辑
摘要:在com 引用那应该找名字叫microsoft web 浏览器,也可以按浏览选c:\winnt\system32\shdocvw.dll 阅读全文
posted @ 2019-08-13 15:59 86727515 阅读(212) 评论(0) 推荐(0) 编辑
摘要:首先下载安装版的AutoIt3,安装后有个AutoItX3.dll,复制到程序bin目录下。 然后添加类文件: 阅读全文
posted @ 2019-08-11 18:21 86727515 阅读(1131) 评论(0) 推荐(1) 编辑
摘要:无论name=''或者name为null都可以查到 阅读全文
posted @ 2019-07-26 09:23 86727515 阅读(693) 评论(0) 推荐(0) 编辑
摘要:static void Main(string[] args) { var url = "http://192.168.20.58/gfwd/comments-1.html"; using (var driver = new PhantomJSDriver(@"E:\selenium\phantomjs-2.1.1-windows\... 阅读全文
posted @ 2019-07-18 18:27 86727515 阅读(696) 评论(0) 推荐(0) 编辑
摘要:Selenium中的显示等待指的是,等待某一元素出现或者等待页面加载完成后,才执行下一步。需要用到WebDriverWait类。 例如: 但是在.net core最新版本的Selenium下使用WebDriverWait的时候,发现找不到ExpectedConditions。有一个比较简单的方法就是 阅读全文
posted @ 2019-07-17 16:25 86727515 阅读(906) 评论(0) 推荐(0) 编辑
摘要://取出Cookie,当登录后才能取 [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)] static extern bool InternetGetCookieEx(string pchURL, string pchCookieName, Stri... 阅读全文
posted @ 2019-07-15 11:02 86727515 阅读(445) 评论(0) 推荐(0) 编辑
摘要:WebBrowser方法如下 AxWebBrowser方法如下 阅读全文
posted @ 2019-07-13 15:40 86727515 阅读(299) 评论(0) 推荐(0) 编辑
摘要:private void axWebBrowser1_NewWindow2(object sender, AxSHDocVw.DWebBrowserEvents2_NewWindow2Event e) { AxSHDocVw.AxWebBrowser _axWebBrowser = CreateNewWebBrowser(); e.... 阅读全文
posted @ 2019-07-13 15:35 86727515 阅读(331) 评论(0) 推荐(0) 编辑
摘要:var sNumbers = "1,2,3,4,5,6"; List numbers = sNumbers.Split(new char[]{','},StringSplitOptions.RemoveEmptyEntries).Select(Int32.Parse).ToList(); 阅读全文
posted @ 2019-06-01 23:57 86727515 阅读(4222) 评论(0) 推荐(0) 编辑
摘要:string a = "a1a2a3a4"; Regex reg1 = new Regex(@"]+>([^]+)]+>", RegexOptions.IgnoreCase);//此用于取一个时,不是集合时应用。 string str = reg1.Match(a).Groups[1].Value; ... 阅读全文
posted @ 2019-05-22 16:03 86727515 阅读(2137) 评论(0) 推荐(0) 编辑
摘要:StringBuilder builder=new StringBuilder(); builder.AppendLine("{"); builder.AppendLine("\"key1\":\"value1\","); builder.AppendLine("\"key2\":\"value2\","); builder.AppendLine("\"key3\":\"value3\",");. 阅读全文
posted @ 2019-05-22 14:17 86727515 阅读(3087) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示