代码整理,组件窗口移动到项目中,公共库代码新建UserSystem共同静态数据,v1.6.14

This commit is contained in:
dathlin
2017-10-15 16:04:28 +08:00
parent 2a3a0c5f98
commit 5a5aeca134
54 changed files with 2979 additions and 317 deletions

View File

@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace CommonLibrary
{
/// <summary>
/// 密码检查的窗口
/// </summary>
public partial class FormPasswordCheck : Form
{
/// <summary>
/// 实例化一个检查输入密码的窗口
/// </summary>
/// <param name="pass">需要配对的密码</param>
public FormPasswordCheck(string pass)
{
InitializeComponent();
password = pass;
Icon = UserSystem.GetFormWindowIcon();
}
private void userButton1_Click(object sender, EventArgs e)
{
if (password == textBox2.Text)
{
DialogResult = DialogResult.OK;
}
else
{
MessageBox.Show("密码错误!");
}
}
private void textBox2_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
userButton1.PerformClick();
}
else if (e.KeyCode == Keys.Escape)
{
Close();
}
}
private void FormPasswordCheck_Load(object sender, EventArgs e)
{
}
private string password = "";
}
}