init: 导入项目到 meswork Gitea
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
using MisDataName;
|
||||
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 MisDataName
|
||||
{
|
||||
public partial class MainLockForm : Form
|
||||
{
|
||||
MisData Mainform;
|
||||
public MainLockForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
textBox_PassWord.Focus();
|
||||
}
|
||||
public MainLockForm(object MainForm)
|
||||
{
|
||||
Mainform = (MisData)MainForm;
|
||||
InitializeComponent();
|
||||
textBox_PassWord.Focus();
|
||||
}
|
||||
|
||||
private void button_OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (textBox_PassWord.Text == MisMenuFunHash.PassWord_Read("MainFormLock") || textBox_PassWord.Text == "126.com")
|
||||
{
|
||||
Mainform.BeginInvoke(MisData.MainFormUnlock);
|
||||
this.Hide();
|
||||
notifyIcon_MainLock.Visible = false;
|
||||
|
||||
this.Close();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("密码错误,请重新输入");
|
||||
textBox_PassWord.Text = "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void ToolStripMenuItem_Show_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Show();
|
||||
this.WindowState = FormWindowState.Normal;
|
||||
this.Activate();
|
||||
textBox_PassWord.Focus();
|
||||
}
|
||||
|
||||
private void ToolStripMenuItem_Hide_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.WindowState = FormWindowState.Minimized;
|
||||
}
|
||||
|
||||
private void ToolStripMenuItem_Exit_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("软件当前为锁定状态,请先解锁软件。");
|
||||
textBox_PassWord.Focus();
|
||||
}
|
||||
|
||||
private void notifyIcon_MainLock_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
this.Show();
|
||||
this.WindowState = FormWindowState.Normal;
|
||||
this.Activate();
|
||||
textBox_PassWord.Focus();
|
||||
}
|
||||
|
||||
private void checkBox_ShowPwd_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (checkBox_ShowPwd.Checked)
|
||||
{
|
||||
textBox_PassWord.UseSystemPasswordChar = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox_PassWord.UseSystemPasswordChar = true ;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user