2013年11月15日
摘要: class SqlServerDataBase:IDataBase { String connstring = null; //执行没有返回值的SQL语句,如insert,update,delete public int executeSql_NoReturn(string strcmd) { SqlConnection conn = new SqlConnection(connstring); SqlCommand oprating = new SqlCommand(strcmd, co... 阅读全文
posted @ 2013-11-15 17:43 筑梦1582 阅读(204) 评论(0) 推荐(0) 编辑
摘要: class AccessDataBase { String connstring = null; public AccessDataBase() { //connstring = System.Environment.CurrentDirectory + @"\config.ini";//ini.getDataBaseString(); connstring = "Provider=Microsoft.Ace.OleDb.12.0;"; connstring += "Data S... 阅读全文
posted @ 2013-11-15 17:39 筑梦1582 阅读(278) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml;using System.Drawing;namespace AccessController{ class ClassXMLAssgin { //const string XMLname = "assign.xml"; const string FatherNode = "devicepoint"; ... 阅读全文
posted @ 2013-11-15 17:36 筑梦1582 阅读(200) 评论(0) 推荐(0) 编辑
摘要: class MoveAccessPoint { bool IsMoving = false; Point pCtrlLastCoordinate = new Point(0, 0); Point pCursorOffset = new Point(0, 0); Point pCursorLastCoordinate = new Point(0, 0); private Control ctrl = null; private ScrollableControl Containe = null; ... 阅读全文
posted @ 2013-11-15 17:31 筑梦1582 阅读(296) 评论(0) 推荐(0) 编辑
摘要: [StructLayout(LayoutKind.Sequential)] public struct SystemTime { public ushort wYear; public ushort wMonth; public ushort wDayOfWeek; public ushort wDay; public ushort wHour; public ushort wMinute; public usho... 阅读全文
posted @ 2013-11-15 17:26 筑梦1582 阅读(135) 评论(0) 推荐(0) 编辑
摘要: public Boolean IsStartUp() { RegistryKey loca = Registry.LocalMachine; RegistryKey run = loca.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true); //未设置开机启动 if (run.GetValue("Access Controller") != null) { ... 阅读全文
posted @ 2013-11-15 17:24 筑梦1582 阅读(201) 评论(0) 推荐(0) 编辑
摘要: // 声明INI文件的写操作函数 WritePrivateProfileString() [System.Runtime.InteropServices.DllImport("kernel32")] private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); // 声明INI文件的读操作函数 GetPrivateProfileString() [System.Runtime.In... 阅读全文
posted @ 2013-11-15 17:22 筑梦1582 阅读(161) 评论(0) 推荐(0) 编辑
摘要: [System.Runtime.InteropServices.DllImport("user32")] private static extern int mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo); [System.Runtime.InteropServices.DllImport("user32")] private static extern bool SetCursorPos(int X, int Y); [Sys... 阅读全文
posted @ 2013-11-15 17:20 筑梦1582 阅读(176) 评论(0) 推荐(0) 编辑
摘要: private void label_1_MouseEnter(object sender, EventArgs e) { Cursor = Cursors.Hand; ((Label)sender).ForeColor = Color.Gray; ((Label)sender).Font = new Font(Var_Font, Var_Font.Style | FontStyle.Underline); } private void label_1_MouseLeave(object... 阅读全文
posted @ 2013-11-15 17:13 筑梦1582 阅读(631) 评论(0) 推荐(0) 编辑
摘要: public void DrawStringToPictureBox(Image Img, string str) { Graphics g = null; g = Graphics.FromImage(Img); Font Var_Font = new Font("宋体", 11); Brush Var_Brush = new SolidBrush(Color.Red); Point location = new Point(20, 5); g.D... 阅读全文
posted @ 2013-11-15 17:09 筑梦1582 阅读(124) 评论(0) 推荐(0) 编辑
摘要: private void displayFormOnPanel2(Form newForm) { newForm.TopLevel = false; //设置为非顶级窗体 newForm.FormBorderStyle = FormBorderStyle.None; //设置窗体为非边框样式 newForm.Dock = System.Windows.Forms.DockStyle.Fill; //设置样式是否填充整个PANEL this.splitCon... 阅读全文
posted @ 2013-11-15 17:08 筑梦1582 阅读(839) 评论(0) 推荐(0) 编辑