摘要: 1 public static string GetMacAddress() 2 { 3 ManagementClass class2 = new ManagementClass("Win32_NetworkAdapterConfiguration"); 4 foreach (ManagementObject obj2 in class2.GetInstances()) 5 { 6 if (obj2["IPEnabled"].ToString()... 阅读全文
posted @ 2011-09-21 10:27 David.Yang 阅读(4239) 评论(1) 推荐(0) 编辑
摘要: 1 /// <summary> 2 /// 浏览文件 3 /// </summary> 4 /// <param name="filePath"></param> 5 public static void ExploreFile(string filePath) 6 { 7 Process proc = new Process(); 8 proc.StartInfo.FileName = "explorer"; 9 //打开资源管理器10 ... 阅读全文
posted @ 2011-09-21 10:25 David.Yang 阅读(15489) 评论(0) 推荐(0) 编辑
摘要: 1 /// <summary> 2 /// 下载文件 TransmitFile 3 /// </summary> 4 /// <param name="filePath"></param> 5 public static void DownloadFile(string filePath) 6 { 7 string filename = HttpContext.Current.Server.MapPath(filePath); 8 var respo... 阅读全文
posted @ 2011-09-21 10:16 David.Yang 阅读(340) 评论(0) 推荐(0) 编辑