45 lines
917 B
C#
45 lines
917 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace bzit.bomg
|
|
{
|
|
public partial class PasswordForm : Form
|
|
{
|
|
private MainForm parentForm = null;
|
|
|
|
public PasswordForm(MainForm form)
|
|
{
|
|
InitializeComponent();
|
|
|
|
parentForm = form;
|
|
}
|
|
|
|
private void button2_Click(object sender, EventArgs e)
|
|
{
|
|
if (parentForm == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
this.Close();
|
|
}
|
|
|
|
private void textBox1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
|
{
|
|
switch (e.KeyCode)
|
|
{
|
|
case Keys.Escape:
|
|
this.Close();
|
|
break;
|
|
default: break;
|
|
}
|
|
}
|
|
|
|
public new string ShowDialog()
|
|
{
|
|
base.ShowDialog();
|
|
|
|
return textBox1.Text;
|
|
}
|
|
}
|
|
} |