/// <summary> /// Updates the TotalTierPoints for this form and matches up which skills should be in /// which ListBox. /// </summary> /// <param name="skillsAdded">The list of skills that were previously applied to the /// character.</param> /// <param name="totalTierPoints">The total amount of tier points.</param> /// <param name="charactercreator">Pass a reference for the same CharacterCreation /// object that is being used for the character.</param> public FrmSkillsAdder(string[] skillsAdded, int totalTierPoints, CharacterCreation characterCreation, string characterType) { characterCreation.skillsAdder = this; InitializeComponent(); this.characterCreation = characterCreation; this.characterType = characterType; txtTiers.Text = totalTierPoints.ToString(); TotalTierPoints = totalTierPoints; if (skillsAdded != null) { lstSkillsPicked.Items.AddRange(skillsAdded); foreach (string item in skillsAdded) { for (int i = 0; i < lstSkills.Items.Count; i++) { if (item == lstSkills.Items[i].ToString()) lstSkills.Items.Remove(item); } } } }
//Stops anything other than number symbols to be entered into textboxes. private void numbersOnly_KeyPress(object sender, KeyPressEventArgs e) { CharacterCreation.NumbersOnly_KeyPress(sender, e); }