コード例 #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            CharacterGenerator.ResetCharacter();
            CharacterGenerator.AbilityScores();
            // general traits
            txtName.Text      = CharacterGenerator.GetName();
            txtAlignment.Text = CharacterGenerator.GetAlignment();
            txtRace.Text      = CharacterGenerator.GetRace();
            txtSize.Text      = CharacterGenerator.GetSize();
            txtClass.Text     = CharacterGenerator.GetClass();
            txtGender.Text    = CharacterGenerator.GetGender();
            txtHP.Text        = CharacterGenerator.GetHitPoints();
            txtSpeed.Text     = CharacterGenerator.GetSpeed();

            // abilities
            txtStrength.Text     = CharacterGenerator.GetStrength();
            txtDexterity.Text    = CharacterGenerator.GetDexterity();
            txtConstituion.Text  = CharacterGenerator.GetConstitution();
            txtIntelligence.Text = CharacterGenerator.GetIntelligence();
            txtWisdom.Text       = CharacterGenerator.GetWisdom();
            txtCharisma.Text     = CharacterGenerator.GetCharisma();

            // skills
            chkBoxAcrobatics.IsChecked = CharacterGenerator.GetAcrobatcis();
            chkBoxBluff.IsChecked      = CharacterGenerator.GetBluff();
            chkBoxClimb.IsChecked      = CharacterGenerator.GetClimb();
            chkBoxDiplomacy.IsChecked  = CharacterGenerator.GetDiplomacy();
            chkBoxFly.IsChecked        = CharacterGenerator.GetFly();
            chkBoxHeal.IsChecked       = CharacterGenerator.GetHeal();
            chkBoxIntimidate.IsChecked = CharacterGenerator.GetIntimidate();
            chkBoxPerception.IsChecked = CharacterGenerator.GetPerception();
            chkBoxStealth.IsChecked    = CharacterGenerator.GetStealth();
        }