48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
namespace WinGreed
|
|
{
|
|
public partial class frmStart : Form
|
|
{
|
|
private frmPersonRound fPR = null;
|
|
public frmStart()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void btnSpela_Click(object sender, EventArgs e)
|
|
{
|
|
if (lvMemberList.Items.Count > 0)
|
|
{
|
|
fPR = new frmPersonRound("Tommy");
|
|
fPR.Show();
|
|
}
|
|
}
|
|
|
|
private void btnAddPlayer_Click(object sender, EventArgs e)
|
|
{
|
|
txtNewName.Visible = true;
|
|
|
|
}
|
|
|
|
private void btnAddOk_Click(object sender, EventArgs e)
|
|
{
|
|
var item=lvMemberList.Items.Add(txtNewName.Text.Trim());
|
|
item.SubItems.Add("0");
|
|
item.SubItems.Add("0");
|
|
txtNewName.Text = "";
|
|
txtNewName.Visible = false;
|
|
btnAddOk.Visible = false;
|
|
}
|
|
|
|
private void txtNewName_TextChanged(object sender, EventArgs e)
|
|
{
|
|
if (txtNewName.Text.Trim().Length > 0)
|
|
{
|
|
btnAddOk.Visible = true;
|
|
}
|
|
else
|
|
{
|
|
btnAddOk.Visible = false;
|
|
}
|
|
}
|
|
}
|
|
} |