2014-12-12 05:44:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX
|
|
|
|
|
{
|
|
|
|
|
public partial class f2_Text : Form
|
|
|
|
|
{
|
2014-12-24 07:29:57 +00:00
|
|
|
|
public f2_Text(TextBox TB_NN)
|
2014-12-12 05:44:05 +00:00
|
|
|
|
{
|
2015-03-11 01:44:51 +00:00
|
|
|
|
Hide();
|
2014-12-12 05:44:05 +00:00
|
|
|
|
InitializeComponent();
|
2015-09-21 03:34:09 +00:00
|
|
|
|
Util.TranslateInterface(this, Main.curlanguage);
|
2014-12-12 05:44:05 +00:00
|
|
|
|
TB_Nickname = TB_NN;
|
|
|
|
|
Font pkxFont = PKX.getPKXFont(12F);
|
2015-03-11 01:44:51 +00:00
|
|
|
|
Label[] lbla =
|
2014-12-12 05:44:05 +00:00
|
|
|
|
{
|
|
|
|
|
L00, L01, L02, L03, L04, L05, L06, L07,
|
|
|
|
|
L08, L09, L0A, L0B, L0C, L0D, L0E, L0F,
|
|
|
|
|
L10, L11, L12, L13, L14, L15, L16, L17,
|
|
|
|
|
L18, L19, L1A, L1B, L1C, L1D, L1E, L1F,
|
|
|
|
|
};
|
2015-03-11 01:44:51 +00:00
|
|
|
|
ushort[] chars =
|
2014-12-12 05:44:05 +00:00
|
|
|
|
{
|
|
|
|
|
0xE081, 0xE082, 0xE083, 0xE084, 0xE085, 0xE086, 0xE087, 0xE08D,
|
|
|
|
|
0xE08E, 0xE08F, 0xE090, 0xE091, 0xE092, 0xE093, 0xE094, 0xE095,
|
|
|
|
|
0xE096, 0xE097, 0xE098, 0xE099, 0xE09A, 0xE09B, 0xE09C, 0xE09D,
|
|
|
|
|
0xE09E, 0xE09F, 0xE0A0, 0xE0A1, 0xE0A2, 0xE0A3, 0xE0A4, 0xE0A5,
|
|
|
|
|
};
|
|
|
|
|
for (int i = 0; i < 32; i++)
|
|
|
|
|
{
|
|
|
|
|
lbla[i].Font = pkxFont;
|
|
|
|
|
lbla[i].Text = Convert.ToChar(chars[i]).ToString();
|
2015-03-11 01:44:51 +00:00
|
|
|
|
lbla[i].Click += onClick;
|
2014-12-12 05:44:05 +00:00
|
|
|
|
}
|
2015-03-11 01:44:51 +00:00
|
|
|
|
CenterToParent();
|
|
|
|
|
Show();
|
2014-12-12 05:44:05 +00:00
|
|
|
|
}
|
2016-01-17 21:27:24 +00:00
|
|
|
|
|
|
|
|
|
readonly TextBox TB_Nickname;
|
2014-12-20 04:22:15 +00:00
|
|
|
|
private void onClick(object sender, EventArgs e)
|
2014-12-12 05:44:05 +00:00
|
|
|
|
{
|
|
|
|
|
string nickname = TB_Nickname.Text;
|
|
|
|
|
if (nickname.Length < TB_Nickname.MaxLength)
|
2016-07-18 18:51:26 +00:00
|
|
|
|
TB_Nickname.Text += ((Label) sender).Text;
|
2014-12-12 05:44:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|