摘要:
//数据库publicclassGF_DA{//////执行SQL语句sConnStr连接字符串,sql执行的sql命令返回第一行第一列////////////publicstaticobjectExecSQL(stringsConnStr,stringsql){using(SqlConnectionconn=newSqlConnection(sConnStr)){using(SqlCommandcmd=newSqlCommand()){try{conn.Open();cmd.Connection=conn;cmd.CommandText=sql;returncmd.ExecuteScalar 阅读全文
posted @ 2013-12-17 14:18
liufei
阅读(138)
评论(0)
推荐(0)
摘要:
//获取部分publicclassGF_GET{//////根据坐标点获取屏幕图像//////左上角横坐标///左上角纵坐标///右下角横坐标///右下角纵坐标///publicstaticImageGetScreen(intx1,inty1,intx2,inty2){intw=(x2-x1);inth=(y2-y1);ImagemyImage=newBitmap(w,h);Graphicsg=Graphics.FromImage(myImage);g.CopyFromScreen(newPoint(x1,y1),newPoint(0,0),newSize(w,h));IntPtrdc1=g. 阅读全文
posted @ 2013-12-17 14:17
liufei
阅读(191)
评论(0)
推荐(0)
摘要:
//读写INIpublicclassGF_INI{[DllImport("kernel32")]privatestaticexternlongWritePrivateProfileString(stringsection,stringkey,stringval,stringfilePath);[DllImport("kernel32")]privatestaticexternintGetPrivateProfileString(stringsection,stringkey,stringdef,StringBuilderretVal,intsize,st 阅读全文
posted @ 2013-12-17 14:15
liufei
阅读(163)
评论(0)
推荐(0)
摘要:
usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingMicrosoft.Win32;//对注册表操作usingSystem.Collections;//使用ArraylistusingSystem.Security.Cryptography;//加密解密usingSystem.IO;//文件操作usingSystem.Runtime.InteropServices;//调用DLLDllImportusingSystem.Management;//获取硬件信息usingSystem.Net;//获取IP地址是用到us 阅读全文
posted @ 2013-12-17 14:14
liufei
阅读(210)
评论(0)
推荐(0)
摘要:
/// /// 截取字符串 超长 用冒号显示 /// /// /// /// public static string SubStr(string sString, int nLeng) { if (sString.Length /// 截取字符串 超长 换行 /// /// /// /// public static string SubStrWrap(string sString, int nLeng) { string sNewStr = sString.Substring(0, nLeng); StringBuilder builder = new StringBu... 阅读全文
posted @ 2013-12-17 14:11
liufei
阅读(388)
评论(0)
推荐(0)