public SkillChallengeSkillForm(SkillChallengeData scd) { InitializeComponent(); List <string> skills = Skills.GetSkillNames(); foreach (string skill in skills) { SkillBox.Items.Add(skill); } DiffBox.Items.Add(Difficulty.Easy); DiffBox.Items.Add(Difficulty.Moderate); DiffBox.Items.Add(Difficulty.Hard); TypeBox.Items.Add(PRIMARY); TypeBox.Items.Add(SECONDARY); TypeBox.Items.Add(AUTOFAIL); fSkillData = scd.Copy(); SkillBox.Text = fSkillData.SkillName; switch (fSkillData.Type) { case SkillType.Primary: TypeBox.SelectedIndex = 0; break; case SkillType.Secondary: TypeBox.SelectedIndex = 1; break; case SkillType.AutoFail: TypeBox.SelectedIndex = 2; break; } DiffBox.SelectedItem = fSkillData.Difficulty; ModBox.Value = fSkillData.DCModifier; DetailsBox.Text = fSkillData.Details; SuccessBox.Text = fSkillData.Success; FailureBox.Text = fSkillData.Failure; SuccessCountBox.Value = fSkillData.Results.Successes; FailureCountBox.Value = fSkillData.Results.Fails; }
public SkillChallengeSkillForm(SkillChallengeData scd) { this.InitializeComponent(); foreach (string skillName in Skills.GetSkillNames()) { this.SkillBox.Items.Add(skillName); } this.DiffBox.Items.Add(Difficulty.Easy); this.DiffBox.Items.Add(Difficulty.Moderate); this.DiffBox.Items.Add(Difficulty.Hard); this.TypeBox.Items.Add("This is a primary skill for this challenge"); this.TypeBox.Items.Add("This is a secondary skill for this challenge"); this.TypeBox.Items.Add("This skill incurs an automatic failure"); this.fSkillData = scd.Copy(); this.SkillBox.Text = this.fSkillData.SkillName; switch (this.fSkillData.Type) { case SkillType.Primary: { this.TypeBox.SelectedIndex = 0; break; } case SkillType.Secondary: { this.TypeBox.SelectedIndex = 1; break; } case SkillType.AutoFail: { this.TypeBox.SelectedIndex = 2; break; } } this.DiffBox.SelectedItem = this.fSkillData.Difficulty; this.ModBox.Value = this.fSkillData.DCModifier; this.DetailsBox.Text = this.fSkillData.Details; this.SuccessBox.Text = this.fSkillData.Success; this.FailureBox.Text = this.fSkillData.Failure; this.SuccessCountBox.Value = this.fSkillData.Results.Successes; this.FailureCountBox.Value = this.fSkillData.Results.Fails; }