forked from TASEmulators/BizHawk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNameStateForm.cs
38 lines (33 loc) · 904 Bytes
/
NameStateForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Windows.Forms;
namespace BizHawk.MultiClient
{
public partial class NameStateForm : Form
{
public string Result;
public bool OK;
public NameStateForm()
{
InitializeComponent();
AcceptButton = saveButton;
CancelButton = cancelButton;
}
private void cancelButton_Click(object sender, EventArgs e)
{
Close();
}
private void saveButton_Click(object sender, EventArgs e)
{
if (stateLabelTextBox.Text.Length != 0)
{
Result = stateLabelTextBox.Text;
OK = true;
Close();
}
}
private void NameStateForm_Shown(object sender, EventArgs e)
{
stateLabelTextBox.Focus();
}
}
}