📄 frmlock.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace SMS
{
public partial class frmLock : Form
{
public frmLock()
{
InitializeComponent();
}
private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)
{
pictureBox1.Focus();
}
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
OleDbConnection conn = BaseClass.ConnClass.DataConn();
conn.Open();
OleDbCommand cmd = new OleDbCommand("select count(*) from tb_Admin where AdminUserPwd='" + textBox1.Text.Trim() + "'", conn);
int i = Convert.ToInt32(cmd.ExecuteScalar());
if (i > 0)
{
this.Close();
}
else
{
if (MessageBox.Show("密码错误", "警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
{
textBox1.Text = "";
textBox1.Focus();
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -