基于C#實(shí)現(xiàn)員工IC卡的讀寫(xiě)功能
實(shí)踐過(guò)程
效果



代碼
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
lblTime.Text = DateTime.Now.ToString();//當(dāng)進(jìn)行考勤的時(shí)候在窗體中顯示當(dāng)前時(shí)間
tsslTime.Text = DateTime.Now.ToString();//在任務(wù)欄中顯示當(dāng)前時(shí)間
}
private void 添加員工ToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 frm2 = new Form2();
frm2.ShowDialog();
}
private void 系統(tǒng)信息ToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("MSINFO32.EXE");
}
private void 開(kāi)始考勤ToolStripMenuItem_Click(object sender, EventArgs e)
{
timer1.Start();//開(kāi)始考勤
panel1.Visible = true;//顯示考勤界面
timer2.Start();//開(kāi)始顯示當(dāng)前時(shí)間
開(kāi)始考勤ToolStripMenuItem.Enabled = false;//禁用開(kāi)始考勤菜單
}
int flag = -1;//設(shè)置的一個(gè)變量,用于控制一張IC卡只讀取一次以及向數(shù)據(jù)庫(kù)中只添加一次內(nèi)容
int flag2 = -1;//設(shè)置的一個(gè)變量,用于控制當(dāng)某個(gè)IC卡已經(jīng)參加考勤后,彈出一次錯(cuò)誤提示
private void timer1_Tick(object sender, EventArgs e)
{
int i = baseClass.ReadIC(txtICCard);//調(diào)用公共類(lèi)中的ReadIC方法開(kāi)始循環(huán)讀取IC卡
if (i == -1)//如果返回值是-1說(shuō)明沒(méi)有IC卡
{
//清空顯示員工信息的文本框
txtDept.Text = "";
txtFolk.Text = "";
txtICCard.Text = "";
txtJob.Text = "";
txtName.Text = "";
txtSex.Text = "";
groupBox1.Text = "考勤進(jìn)行中";
flag = -1;//初始化標(biāo)記
flag2 = -1;//初始化標(biāo)記
}
else//如果有IC卡進(jìn)行考勤
{
if (flag ==-1)//只有當(dāng)flag為-1的時(shí)候執(zhí)行
{
string icID = txtICCard.Text.Trim();//獲取讀取的IC卡編號(hào)
if (baseClass.isCheck(icID))//isCheck方法判斷是否參加過(guò)考勤
{
if (flag2 == -1)//只有當(dāng)flag2為-1的時(shí)候執(zhí)行
{
flag2 = 0;//改變標(biāo)記的值從而實(shí)現(xiàn)只彈出一次警告對(duì)話框
MessageBox.Show("已經(jīng)參加過(guò)考勤!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Error);
//清空文本框
txtDept.Text = "";
txtFolk.Text = "";
txtICCard.Text = "";
txtJob.Text = "";
txtName.Text = "";
txtSex.Text = "";
txtICCard.Text = "";
groupBox1.Text = "考勤進(jìn)行中";
}
}
else//如果沒(méi)有參加過(guò)考勤
{
//調(diào)用GetInfo方法獲取IC卡對(duì)應(yīng)的員工信息
baseClass.GetInfo(txtICCard.Text.Trim(), txtName, txtSex, txtJob, txtFolk, txtDept, groupBox1);
string name = txtName.Text.Trim();//員工姓名
string sex = txtSex.Text.Trim();//員工性別
string job = txtJob.Text.Trim();//員工職位
string folk = this.txtFolk.Text.Trim();//員工民族
string dept = txtDept.Text.Trim();//員工部門(mén)
//聲明一個(gè)字符串,用于存儲(chǔ)一條插入語(yǔ)句,實(shí)現(xiàn)將考勤信息插入到數(shù)據(jù)表中
string str = "insert into CheckNote(C_CardID,C_Name,C_Sex,C_Job,C_Folk,C_Dept,C_Time) values('" + icID + "','" + name + "','" + sex + "','" + job + "','" + folk + "','" + dept + "','" + DateTime.Now.ToShortDateString() + "')";
baseClass.ExecuteSQL(str);//ExecuteSQL方法執(zhí)行SQL語(yǔ)句
tsslEinfo.Text = "已經(jīng)有"+baseClass.GetNum(DateTime.Now.ToShortDateString())+"人參加考勤";
}
}
flag = 0;//改變flag的值實(shí)現(xiàn)一張IC卡只存儲(chǔ)一次信息
}
}
private void 退出系統(tǒng)ToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void timer2_Tick(object sender, EventArgs e)
{
lblTime.Text = DateTime.Now.ToString();
}
private void 考勤結(jié)束ToolStripMenuItem_Click(object sender, EventArgs e)
{
開(kāi)始考勤ToolStripMenuItem.Enabled = true;
panel1.Visible = false;
timer1.Stop();
timer2.Stop();
tsslEinfo.Text = "";
}
private void 考勤記錄ToolStripMenuItem_Click(object sender, EventArgs e)
{
Form3 frm3 = new Form3();
frm3.ShowDialog();
}
private void timer3_Tick(object sender, EventArgs e)
{
tsslTime.Text = DateTime.Now.ToString();
}
private void 關(guān)于ToolStripMenuItem_Click(object sender, EventArgs e)
{
AboutBox1 ab = new AboutBox1();
ab.ShowDialog();
}
}
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void Form2_Load(object sender, EventArgs e)
{
cbFolk.SelectedIndex = 0;//民族選項(xiàng)默認(rèn)第一項(xiàng)被選中
cbSex.SelectedIndex = 0;//性別選項(xiàng)默認(rèn)第一項(xiàng)被選中
}
private void button1_Click(object sender, EventArgs e)
{
if (txtDept.Text == "" || txtICCard.Text == "" || txtJob.Text == "" || txtName.Text == "")
{
MessageBox.Show("請(qǐng)將信息輸入完整!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
string icID = txtICCard.Text.Trim();//要寫(xiě)入IC卡的數(shù)據(jù)
string name = txtName.Text.Trim();//員工姓名
string sex = cbSex.Text.Trim();//員工性別
string job = txtJob.Text.Trim();//員工職位
string folk= cbFolk.Text.Trim();//員工民族
string dept = txtDept.Text.Trim();//員工部門(mén)
if (baseClass.CheckID(icID))//CheckID方法檢查編號(hào)是否存在
{
MessageBox.Show("IC卡編號(hào)已經(jīng)存在!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
if (baseClass.WriteIC(icID) == 0)//WriteIC方法將編號(hào)寫(xiě)入IC卡,如果成功則返回0
{
//聲明一條語(yǔ)句,用于將員工其他信息插入到數(shù)據(jù)表中
string strSQL = "insert into Employee(CardID,E_Name,E_Sex,E_Job,E_Folk,E_Dept,E_Time) values('" + icID + "','" + name + "','" + sex + "','" + job + "','" + folk + "','" + dept + "','"+DateTime.Now.ToShortDateString()+"')";
if (baseClass.ExecuteSQL(strSQL))//ExecuteSQL方法執(zhí)行這條語(yǔ)句
{
MessageBox.Show("IC卡注冊(cè)完畢!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
}
}
private void txtICCard_TextChanged(object sender, EventArgs e)
{
if (Regex.IsMatch(txtICCard.Text.Trim(), "[\u4e00-\u9fa5]"))
{
MessageBox.Show("禁止輸入漢字!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
#region 使用動(dòng)態(tài)鏈接庫(kù),聲明方法
[StructLayout(LayoutKind.Sequential)]
public unsafe class IC
{
//對(duì)設(shè)備進(jìn)行初始化
[DllImport("Mwic_32.dll", EntryPoint = "auto_init", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern int auto_init(int port, int baud);
//設(shè)備密碼格式
[DllImport("Mwic_32.dll", EntryPoint = "setsc_md", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern int setsc_md(int icdev, int mode);
//獲取設(shè)備當(dāng)前狀態(tài)
[DllImport("Mwic_32.dll", EntryPoint = "get_status", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern Int16 get_status(int icdev, Int16* state);
//關(guān)閉設(shè)備通訊接口
[DllImport("Mwic_32.dll", EntryPoint = "ic_exit", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern int ic_exit(int icdev);
//使設(shè)備發(fā)出蜂鳴聲
[DllImport("Mwic_32.dll", EntryPoint = "dv_beep", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern int dv_beep(int icdev, int time);
//向IC卡中寫(xiě)數(shù)據(jù)
[DllImport("Mwic_32.dll", EntryPoint = "swr_4442", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern int swr_4442(int icdev, int offset, int len, char* w_string);
//讀取IC卡中數(shù)據(jù)
[DllImport("Mwic_32.dll", EntryPoint = "srd_4442", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern int srd_4442(int icdev, int offset, int len, char* r_string);
//核對(duì)卡密碼
[DllImport("Mwic_32.dll", EntryPoint = "csc_4442", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
public static extern Int16 Csc_4442(int icdev, int len, [MarshalAs(UnmanagedType.LPArray)] byte[] p_string);
}
#endregion
class baseClass
{
public static int WriteIC(string id)//寫(xiě)入IC卡的方法
{
int flag = -1;
//初始化
int icdev = IC.auto_init(0, 9600);
if (icdev < 0)
MessageBox.Show("端口初始化失敗,請(qǐng)檢查接口線是否連接正確。", "錯(cuò)誤提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
int md = IC.setsc_md(icdev, 1); //設(shè)備密碼格式
unsafe
{
Int16 status = 0;
Int16 result = 0;
result = IC.get_status(icdev, &status);
if (result != 0)
{
MessageBox.Show("設(shè)備當(dāng)前狀態(tài)錯(cuò)誤!");
int d1 = IC.ic_exit(icdev); //關(guān)閉設(shè)備
}
if (status != 1)
{
MessageBox.Show("請(qǐng)插入IC卡");
int d2 = IC.ic_exit(icdev); //關(guān)閉設(shè)備
}
}
unsafe
{
//卡的密碼默認(rèn)為6個(gè)F(密碼為:ffffff),1個(gè)F的16進(jìn)制是15,2個(gè)F的16進(jìn)制是255。
byte[] pwd = new byte[3] { 0xff, 0xff, 0xff };
Int16 checkIC_pwd = IC.Csc_4442(icdev, 3, pwd);
if (checkIC_pwd < 0)
{
MessageBox.Show("IC卡密碼錯(cuò)誤!");
}
char str = 'a';
int write = -1;
for (int j = 0; j < id.Length; j++)
{
str = Convert.ToChar(id.Substring(j, 1));
write = IC.swr_4442(icdev, 33 + j, id.Length, &str);
}
if (write == 0)
{
flag = write;
int beep = IC.dv_beep(icdev, 20); //發(fā)出蜂鳴聲
}
else
MessageBox.Show("數(shù)據(jù)寫(xiě)入IC卡失敗!");
}
int d = IC.ic_exit(icdev); //關(guān)閉設(shè)備
return flag;
}
public static int ff = -1;
public static int ReadIC(TextBox tb)//讀取IC卡
{
int flag = -1;
//初始化
int icdev = IC.auto_init(0, 9600);
if (icdev < 0)
MessageBox.Show("端口初始化失敗,請(qǐng)檢查接口線是否連接正確。", "錯(cuò)誤提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
int md = IC.setsc_md(icdev, 1); //設(shè)備密碼格式
unsafe
{
Int16 status = 0;
Int16 result = 0;
result = IC.get_status(icdev, &status);
if (result != 0)
{
MessageBox.Show("設(shè)備當(dāng)前狀態(tài)錯(cuò)誤!");
int d1 = IC.ic_exit(icdev); //關(guān)閉設(shè)備
}
if (status != 1)
{
ff = -1;
int d2 = IC.ic_exit(icdev); //關(guān)閉設(shè)備
}
}
unsafe
{
char str;
int read = -1;
string ic = "";
for (int j = 0; j < 6; j++)
{
read = IC.srd_4442(icdev, 33 + j, 1, &str);
ic = ic + Convert.ToString(str);
}
tb.Text = ic;
if (ff == -1)
{
int i = IC.dv_beep(icdev, 10); //發(fā)出蜂鳴聲
}
if (read == 0)
{
ff = 0;
flag = read;
}
}
int d = IC.ic_exit(icdev); //關(guān)閉設(shè)備
return flag;
}
public static bool ExecuteSQL(string sql)//執(zhí)行SQL語(yǔ)句
{
bool flag = false;
string strg = Application.StartupPath.ToString();
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg += @"\db1.mdb";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + strg);
conn.Open();
OleDbCommand cmd = new OleDbCommand(sql, conn);
int i = cmd.ExecuteNonQuery();
if (i > 0)
{
flag = true;
conn.Close();
}
return flag;
}
public static bool CheckID(string id)//判斷輸入的IC卡號(hào)是否已經(jīng)存在
{
bool flag = false;
string strg = Application.StartupPath.ToString();
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg += @"\db1.mdb";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + strg);
conn.Open();
OleDbCommand cmd = new OleDbCommand("select Count(*) from Employee where CardID='"+id+"'", conn);
int i = Convert.ToInt32(cmd.ExecuteScalar());
conn.Close();
if (i > 0)
{
flag = true;
}
return flag;
}
public static void GetInfo(string id,TextBox name,TextBox sex,TextBox job,TextBox folk,TextBox dept,GroupBox gb)//根據(jù)IC卡號(hào)獲取相應(yīng)的信息
{
if (CheckID(id))
{
string strg = Application.StartupPath.ToString();
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg += @"\db1.mdb";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + strg);
conn.Open();
OleDbCommand cmd = new OleDbCommand("select * from Employee where CardID='" + id + "'", conn);
OleDbDataReader sdr = cmd.ExecuteReader();
sdr.Read();
name.Text = sdr["E_Name"].ToString();
sex.Text = sdr["E_Sex"].ToString();
job.Text = sdr["E_Job"].ToString();
folk.Text = sdr["E_Folk"].ToString();
dept.Text = sdr["E_Dept"].ToString();
gb.Text = "考勤進(jìn)行中(考勤成功)";
sdr.Close();
conn.Close();
}
else
{
gb.Text = "考勤進(jìn)行中(此IC卡未被注冊(cè)?。?;
}
}
public static void ExportData(DataGridView srcDgv, string fileName)//導(dǎo)出數(shù)據(jù),傳入一個(gè)datagridview和一個(gè)文件路徑
{
string type = fileName.Substring(fileName.IndexOf(".") + 1);//獲得數(shù)據(jù)類(lèi)型
if (type.Equals("xls", StringComparison.CurrentCultureIgnoreCase))//Excel文檔
{
Excel.Application excel = new Excel.Application();
try
{
excel.DisplayAlerts = false;
excel.Workbooks.Add(true);
excel.Visible = false;
for (int i = 0; i < srcDgv.Columns.Count; i++)//設(shè)置標(biāo)題
{
excel.Cells[2, i + 1] = srcDgv.Columns[i].HeaderText;
}
for (int i = 0; i < srcDgv.Rows.Count; i++)//填充數(shù)據(jù)
{
for (int j = 0; j < srcDgv.Columns.Count; j++)
{
if (srcDgv[j, i].ValueType.ToString() == "System.Byte[]")
{
excel.Cells[i + 3, j + 1] = "System.Byte[]";
}
else
{
excel.Cells[i + 3, j + 1] = srcDgv[j, i].Value;
}
}
}
excel.Workbooks[1].SaveCopyAs(fileName);//保存
}
finally
{
excel.Quit();
}
return;
}
//保存Word文件
if (type.Equals("doc", StringComparison.CurrentCultureIgnoreCase))
{
object path = fileName;
Object none = System.Reflection.Missing.Value;
Word.Application wordApp = new Word.Application();
Word.Document document = wordApp.Documents.Add(ref none, ref none, ref none, ref none);
//建立表格
Word.Table table = document.Tables.Add(document.Paragraphs.Last.Range, srcDgv.Rows.Count + 1, srcDgv.Columns.Count, ref none, ref none);
try
{
for (int i = 0; i < srcDgv.Columns.Count; i++)//設(shè)置標(biāo)題
{
table.Cell(1, i + 1).Range.Text = srcDgv.Columns[i].HeaderText;
}
for (int i = 0; i < srcDgv.Rows.Count; i++)//填充數(shù)據(jù)
{
for (int j = 0; j < srcDgv.Columns.Count; j++)
{
string a = srcDgv[j, i].ValueType.ToString();
if (a == "System.Byte[]")
{
PictureBox pp = new PictureBox();
byte[] pic = (byte[])(srcDgv[j, i].Value); //將數(shù)據(jù)庫(kù)中的圖片轉(zhuǎn)換成二進(jìn)制流
MemoryStream ms = new MemoryStream(pic); //將字節(jié)數(shù)組存入到二進(jìn)制流中
pp.Image = Image.FromStream(ms); //二進(jìn)制流Image控件中顯示
pp.Image.Save(@"C:\22.bmp"); //將圖片存入到指定的路徑
object aaa = table.Cell(i + 2, j + 1).Range;
wordApp.Selection.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
wordApp.Selection.InlineShapes.AddPicture(@"C:\22.bmp", ref none, ref none, ref aaa);
pp.Dispose();
}
else
{
table.Cell(i + 2, j + 1).Range.Text = srcDgv[j, i].Value.ToString();
}
}
}
document.SaveAs(ref path, ref none, ref none, ref none, ref none, ref none, ref none, ref none, ref none, ref none, ref none);
document.Close(ref none, ref none, ref none);
if (File.Exists(@"C:\22.bmp"))
{
File.Delete(@"C:\22.bmp");
}
}
finally
{
wordApp.Quit(ref none, ref none, ref none);
}
}
}
public static void BinddataGridView(DataGridView dg, string datetime)
{
string strg = Application.StartupPath.ToString();
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg += @"\db1.mdb";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + strg);
conn.Open();
string str = "select C_CardID as IC卡編號(hào),C_Name as 員工姓名,C_Sex as 性別,C_Job as 職位,C_Folk as 民族,C_Dept as 員工部門(mén),C_Time as 考勤日期 from CheckNote where C_Time='" + datetime + "'";
OleDbDataAdapter da = new OleDbDataAdapter(str, conn);
System.Data.DataTable dt = new System.Data.DataTable();
da.Fill(dt);
dg.DataSource = dt;
dg.Columns[0].Width = 80;
dg.Columns[1].Width = 80;
dg.Columns[2].Width = 60;
dg.Columns[3].Width = 60;
dg.Columns[4].Width = 60;
dg.Columns[5].Width = 80;
dg.Columns[6].Width = 80;
conn.Close();
}
public static bool isCheck(string id)//檢查是否已經(jīng)參加過(guò)考勤
{
bool flag = false;
string strg = Application.StartupPath.ToString();
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg += @"\db1.mdb";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + strg);
conn.Open();
OleDbCommand cmd = new OleDbCommand("select Count(*) from CheckNote where C_CardID='" + id + "'", conn);
int i = Convert.ToInt32(cmd.ExecuteScalar());
conn.Close();
if (i > 0)
{
flag = true;
}
return flag;
}
public static int GetNum(string datetime)//獲取所有參加考勤的人數(shù)
{
string strg = Application.StartupPath.ToString();
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg = strg.Substring(0, strg.LastIndexOf("\\"));
strg += @"\db1.mdb";
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + strg);
conn.Open();
OleDbCommand cmd = new OleDbCommand("select Count(*) from CheckNote where C_Time='" + datetime + "'", conn);
int i = Convert.ToInt32(cmd.ExecuteScalar());
conn.Close();
return i;
}
}
到此這篇關(guān)于基于C#實(shí)現(xiàn)員工IC卡的讀寫(xiě)功能的文章就介紹到這了,更多相關(guān)C#讀寫(xiě)員工IC卡內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
C#實(shí)現(xiàn)日期操作類(lèi)DateTime的方法示例
C#中日期和時(shí)間操作主要通過(guò)System.DateTime類(lèi)實(shí)現(xiàn),提供了創(chuàng)建、格式化、比較和計(jì)算等功能,下面就來(lái)具體介紹一下,感興趣的可以了解一下2025-03-03
C#程序中session值的保存方法以及轉(zhuǎn)為字符串的方法總結(jié)
這篇文章主要介紹了C#程序中session值的保存方法以及轉(zhuǎn)為字符串的方法總結(jié),經(jīng)常被用于ASP.NET網(wǎng)絡(luò)編程項(xiàng)目中,需要的朋友可以參考下2016-04-04
C#設(shè)置開(kāi)機(jī)啟動(dòng)項(xiàng)、取消開(kāi)機(jī)啟動(dòng)項(xiàng)
這篇文章主要介紹了C#設(shè)置開(kāi)機(jī)啟動(dòng)項(xiàng)、取消開(kāi)機(jī)啟動(dòng)項(xiàng),本文通過(guò)修改注冊(cè)實(shí)現(xiàn),并給出操作代碼,需要的朋友可以參考下2015-06-06
C#實(shí)現(xiàn)Base64處理的加密解密,編碼解碼示例
這篇文章主要介紹了C#實(shí)現(xiàn)Base64處理的加密解密,編碼解碼,結(jié)合實(shí)例形式分析了基于C#實(shí)現(xiàn)的base64編碼解碼操作相關(guān)技巧,需要的朋友可以參考下2017-01-01
C#切換鼠標(biāo)左右鍵習(xí)慣無(wú)需控制面板中修改
本人一直喜歡左手使用鼠標(biāo),偶爾同事會(huì)臨時(shí)操作一下,因?yàn)樗牧?xí)慣是右手,還得在控制面板里進(jìn)行更改,太麻煩了所以就編寫(xiě)一個(gè)控制臺(tái)程序,雙擊一下即可切換左右鍵,熱愛(ài)懶人的你可不要錯(cuò)過(guò)了哈2013-02-02

