This repository has been archived on 2022-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
bookmark-manager/PasswordForm.cs
2019-04-21 18:53:56 +01:00

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;
}
}
}