private void button2_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtNome.Text) && !string.IsNullOrEmpty(txtEnergia.Text) && !string.IsNullOrEmpty(txtIdade.Text) && !string.IsNullOrEmpty(txtPeso.Text) && !string.IsNullOrEmpty(comboBox1.Text)) { CtrlGuerreiro.guerreiro(tipoNacao, txtNome.Text, txtEnergia.Text, txtIdade.Text, txtPeso.Text, comboBox1.Text, listDefensores, listOfensores); adicionarListView(); checkBox1.Checked = false; } if (listDefensores.Count > 0 && listOfensores.Count > 0) { btnNacaoPronta.Enabled = true; } }
private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked) { GuerreiroDAO.dadosGuerreiro dados = CtrlGuerreiro.carregarGuerreiro(tipoNacao); txtNome.Text = dados.Nome; txtEnergia.Text = dados.Energia; txtIdade.Text = dados.Idade; txtPeso.Text = dados.Peso; } else { txtNome.Clear(); txtEnergia.Clear(); txtIdade.Clear(); txtPeso.Clear(); } }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { CtrlGuerreiro.carregarImagem(comboBox1, pictureBox1); }