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)
编辑
摘要:
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
阅读(279)
推荐(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
阅读(201)
推荐(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
阅读(300)
推荐(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
阅读(138)
推荐(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
阅读(204)
推荐(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
阅读(163)
推荐(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
阅读(178)
推荐(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
阅读(640)
推荐(0)
编辑