You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Estsh.Client
|
|
{
|
|
public partial class FrmInputBoxRework : Form
|
|
{
|
|
private string _input = string.Empty;
|
|
|
|
public string Input
|
|
{
|
|
get { return _input; }
|
|
}
|
|
|
|
public FrmInputBoxRework()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void FrmInputBoxRework_Load(object sender, EventArgs e)
|
|
{
|
|
txtInput .Focus ();
|
|
}
|
|
|
|
private void txtPassword_KeyPress(object sender, KeyPressEventArgs e)
|
|
{
|
|
if (e.KeyChar == (char)13)
|
|
{
|
|
if (string.IsNullOrEmpty(txtInput.Text))
|
|
{
|
|
this.DialogResult = DialogResult.No;
|
|
}
|
|
else
|
|
{
|
|
_input = txtInput.Text;
|
|
this.DialogResult = DialogResult.OK;
|
|
}
|
|
}
|
|
}
|
|
|
|
private void FrmInputBoxRework_Activated(object sender, EventArgs e)
|
|
{
|
|
txtInput.Focus();
|
|
}
|
|
}
|
|
}
|