private void classButton_Click(object sender, EventArgs e) { try { fCCSelection fCC = new fCCSelection(); fCC.fCCLoadSelections("Class: " + classBox.SelectedItem, pc); fCC.ShowDialog(); string curItem = classBox.SelectedItem.ToString(); pc.setClass(curItem); } catch { } }
private void raceButton_Click(object sender, EventArgs e) { if (pc.getBaseAS().Contains(0)) { MessageBox.Show("Please commit all of your Ability Scores before selecting a race.", "Race Selection Error", MessageBoxButtons.OK); } else { try { fCCSelection fCC = new fCCSelection(); fCC.fCCLoadSelections("Race: " + raceBox.SelectedItem, pc); fCC.ShowDialog(); string curItem = raceBox.SelectedItem.ToString(); pc.setRace(curItem); pc.setStats(pc.race.getStats()); strLabel.Text = pc.getSTR().ToString(); pc.setStrMod(Calculations.calcMod(pc.getSTR())); strModLabel.Text = pc.getSTRMod().ToString(); dexLabel.Text = pc.getDEX().ToString(); pc.setDexMod(Calculations.calcMod(pc.getDEX())); dexModLabel.Text = pc.getDEXMod().ToString(); conLabel.Text = pc.getCON().ToString(); pc.setConMod(Calculations.calcMod(pc.getCON())); conModLabel.Text = pc.getCONMod().ToString(); intLabel.Text = pc.getINT().ToString(); pc.setIntelMod(Calculations.calcMod(pc.getINT())); intModLabel.Text = pc.getINTMod().ToString(); wisLabel.Text = pc.getWIS().ToString(); pc.setWisMod(Calculations.calcMod(pc.getWIS())); wisModLabel.Text = pc.getWISMod().ToString(); chaLabel.Text = pc.getCHA().ToString(); pc.setChaMod(Calculations.calcMod(pc.getCHA())); chaModLabel.Text = pc.getCHAMod().ToString(); } catch { } } }