摘要: /// ///把图片转换到文本信息/// /// 图片的路径/// 文本存储路径public void GetImageToString(string imagePath,string savePath){Stream s = File.Open(imagePath, FileMode.Open);... 阅读全文
posted @ 2014-06-16 10:02 hongsedigua 阅读(169) 评论(0) 推荐(0) 编辑
摘要: private BitmapSource bs(Bitmap bt) { IntPtr ip = bt.GetHbitmap(); BitmapSource bitmapSource = System.Windows.Interop.Imag... 阅读全文
posted @ 2014-06-10 15:06 hongsedigua 阅读(1972) 评论(0) 推荐(1) 编辑
摘要: using System;using System.Data;using System.Xml;using System.Data.SqlClient;using System.Collections;namespace CommonClassLib{ /// /// The SqlHelper class is intended to encapsulate high performance, scalable best practices for /// common uses of SqlClient /// public sealed class S... 阅读全文
posted @ 2013-12-20 16:42 hongsedigua 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 1 public string logFile; 2 private int configLogLevel = 0; 3 private Stream s = null; 4 StreamWriter sw = null; 5 6 /// 7 /// 用log文件名初始化对象 8 /// 9 /// 10 public WriteLog(string logFile) 11 { 12 this.log... 阅读全文
posted @ 2013-12-20 16:30 hongsedigua 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 最近在写数据通信的时候用到的东西!希望对大家有帮助 1 /// 2 /// 获取或设置服务器IP地址 3 /// 4 public string serverIP = ""; 5 /// 6 /// 获取或设置服务器端口 7 /// 8 public int serverPort = 0; 9 /// 10 /// 连接对象 11 /// 12 pri... 阅读全文
posted @ 2013-12-20 16:26 hongsedigua 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 使用前要导入SQLDMO.dll下载地址:http://down.51cto.com/data/853937 1.在用户的配置时,我们需要列出当前局域网内所有的数据库服务器,并且要列出指定服务器的所有数据库,实现代码如下: 取得数据库服务器列表:publicArrayListGetServerList(){ArrayListalServers=newArrayList();SQLDMO.ApplicationsqlApp=newSQLDMO.ApplicationClass();try{SQLDMO.NameListserverList=sqlApp.ListAvailableSQLServe 阅读全文
posted @ 2013-06-28 16:38 hongsedigua 阅读(460) 评论(0) 推荐(0) 编辑