// This craetes a form that displays the character statblocks private void btnStatBlock_Click(object sender, EventArgs e) { if (this.lstCharacter.SelectedIndices.Count > 0) { var statBlockForm = new CharacterStatBlockForm(_characterManager, lstCharacter.SelectedIndices[0]); statBlockForm.ShowDialog(); } else { MessageBox.Show("Pleaee make a selection."); } }
// This method allows the user to select a character by double clicking one on // the character list private void lstCharacter_DoubleClick(object sender, EventArgs e) { var statBlockForm = new CharacterStatBlockForm(_characterManager, lstCharacter.SelectedIndices[0]); statBlockForm.ShowDialog(); }