摘要:string txt = "{\"ip\": \"127.0.0.1\", \"port\": 80, \"status\": \"NULL\", \"type\": \"ee\", \"arg\": \"admin:123456\"},"; Match m = Regex.Match(txt, @"""(.*?)"":(.*?),");
阅读全文
随笔分类 - 日常编译代码方法
摘要:string txt = "{\"ip\": \"127.0.0.1\", \"port\": 80, \"status\": \"NULL\", \"type\": \"ee\", \"arg\": \"admin:123456\"},"; Match m = Regex.Match(txt, @"""(.*?)"":(.*?),");
阅读全文
摘要:public void HttpListenerStar() { try { HttpListener httpListener = new HttpListener(); httpListener.AuthenticationSchemes = Auth...
阅读全文
摘要://获取字符串的MD5码 public string CreateMD5Hash(string input) { // Use input string to calculate MD5 hash System.Security.Cryptography.MD5 md5 = System.Security...
阅读全文
摘要:/// /// 计算文件大小函数(保留两位小数),Size为字节大小 /// /// 初始文件大小 /// public static string GetFileSize(long size) { var num = 1024.00; //byte ...
阅读全文
摘要:public static string MillisecondsToTime(double se) { string str = ""; TimeSpan ts = TimeSpan.FromMilliseconds(se); if (ts.Days > 0) str +=...
阅读全文
摘要:#region Http 访问 public string GetHttpUrl(string Url) { try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url); ...
阅读全文
摘要:static string NetworkName = new PerformanceCounterCategory("Network Interface").GetInstanceNames()[0];//获取网卡名称 PerformanceCounter NetworkR = new PerformanceCounter("Network Interface", "By...
阅读全文
摘要:/// /// 时间转 时间戳 /// /// /// public string DateToUnix10(DateTime time) { System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalT...
阅读全文
摘要:设置 listView1.VirtualMode = true; listView1.RetrieveVirtualItem += ListView1_RetrieveVirtualItem; private void ListView1_RetrieveVirtualItem(object sen
阅读全文
摘要:public class DoubleBufferListView : ListView { public DoubleBufferListView() { SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuff
阅读全文
|