private void CharacterSheet_Load(object sender, EventArgs e) { //createTestCharacter(); /* used to bypass the normal character creation process */ playerCharacter.StartingInventory(); /* populate inventory with test items */ // ensures that the createChar object is correctly cast as the starting form int i = 0; while (createChar == null) { if (Application.OpenForms[i] is CreateCharacter) { createChar = (CreateCharacter)Application.OpenForms[i]; } else { i++; } } /**** Profile *****/ picPortrait.Image = playerCharacter.Portrait; boxStr.Text = Convert.ToString(playerCharacter.Strength); boxDex.Text = Convert.ToString(playerCharacter.Dexterity); boxCon.Text = Convert.ToString(playerCharacter.Constitution); boxInt.Text = Convert.ToString(playerCharacter.Intelligence); boxWis.Text = Convert.ToString(playerCharacter.Wisdom); boxCha.Text = Convert.ToString(playerCharacter.Charisma); lblCharName.Text = playerCharacter.ToString(); lblCharInfo.Text = playerCharacter.CharInfoToString(); boxExp.Text = playerCharacter.ExperienceToString(); boxHP.Text = playerCharacter.HitPointsToString(); boxWillSave.Text = playerCharacter.WillSaveToString(); boxRefSave.Text = playerCharacter.RefSaveToString(); boxFortSave.Text = playerCharacter.FortSaveToString(); updateArmour(); updatePlayerAttack(); /**** Inventory *****/ boxGold.Text = String.Format("{0:N0}", playerCharacter.Gold); generateInventoryPics(); //initWeaponPics(); //Allow drop for equipped item slots picMainHand.AllowDrop = true; picArmour.AllowDrop = true; }