随笔分类 - C#
c#
摘要:int offset=0; int size=4096;var maxNum=int.MaxValue; progressBar.Maximum =maxNum; progressBar.Minimum = 0; progressBar.Value = 0; offset += size; progressBar.Value = offset;//百分比PbLabel.Content = (of...
阅读全文
摘要:1 public static class IListUtil 2 { 3 /// 4 /// 将集合类转换成DataTable 5 /// 6 /// 集合 7 /// 8 public static DataTable AsDataTab...
阅读全文
摘要:1 public void Test(){2 3 var query = from a in A join b in B on A.Id equals B.Id into c4 from d in c.DefaultIfEmpty()5 ...
阅读全文
摘要:1 using System; 2 using System.Threading; 3 using System.Windows; 4 using System.Windows.Controls; 5 using WangCai.Common; 6 7 namespace Wang...
阅读全文
摘要:private const int INTERNET_CONNECTION_MODEM = 1; private const int INTERNET_CONNECTION_LAN = 2; private const int INTERNET_CONNE...
阅读全文
摘要:1 #region 打开键盘的键 2 const uint KEYEVENTF_EXTENDEDKEY = 0x1; 3 const uint KEYEVENTF_KEYUP = 0x2; 4 5 [DllImport("user3...
阅读全文
摘要:[DllImport("user32.dll")] static extern bool GetLastInputInfo(ref LASTINPUTINFO plii); public static long GetIdleTick() {...
阅读全文
摘要:.NET技术交流群 199281001 .欢迎加入。 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Windows; ...
阅读全文
摘要:.NET技术交流群 199281001 .欢迎加入。using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Remoting.Metadata.W3cXsd2001; using System.Security.Permissions; using System.Text; u...
阅读全文
摘要:List ipList = new List(); foreach (IPAddress _IPAddress in Dns.GetHostEntry(Dns.GetHostName()).AddressList) { ...
阅读全文
摘要:/// /// 复制或剪切文件到剪切板 /// /// 文件路径数组 /// true:剪切;false:复制 public static void CopyToClipboard(string[] f...
阅读全文
摘要:Action a = () => { i += 1; var timer = new System.Timers.Timer(800) { Interval = 600 }; ...
阅读全文
摘要:/// /// 设置鼠标的坐标 /// /// 横坐标 /// 纵坐标 [DllImport("User32")] public extern stat...
阅读全文
摘要:1 user32.dll中的所有函数 2 3 4 5 6 using System; 7 using System.Collections.Generic; 8 using System.Linq; 9 using System.Text; ...
阅读全文
摘要:1 using System; 2 using System.IO; 3 using System.Net; 4 using System.Text; 5 using System.Web.Script.Serialization; 6 7 namespace IpUtils 8 { 9 ...
阅读全文
摘要:1 //开启线程加载 2 Action a = () => 3 { 4 var row = 7; 5 var column = 9; 6 7 var p...
阅读全文
摘要:1 using System; 2 using System.IO; 3 using System.Collections.Generic; 4 using System.Windows; 5 using System.Windows.Controls; 6 using System....
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace Common 7 { 8 //Author:GaoBin...
阅读全文
摘要:.NET技术交流群 199281001 .欢迎加入。1.配置类1 public class Log4NetConfig2 {3 public static string SqlServer = "ADONetAppender_SqlServer";4 public static st...
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Runtime.InteropServices; 5 using System.Text; 6 using S...
阅读全文