public SkillChallengeDetailsForm(SkillChallenge sc) { InitializeComponent(); fChallenge = sc.Copy() as SkillChallenge; Browser.DocumentText = HTML.SkillChallenge(fChallenge, false, true, Session.Preferences.TextSize); }
private void AddLibraryBtn_Click(object sender, EventArgs e) { LibrarySelectForm dlg = new LibrarySelectForm(); if (dlg.ShowDialog() == DialogResult.OK) { Library lib = dlg.SelectedLibrary; lib.SkillChallenges.Add(fChallenge.Copy() as SkillChallenge); } }
private static bool add_challenge(Encounter enc) { if (EncounterBuilder.fChallenges.Count == 0) { return(false); } int num = Session.Random.Next() % EncounterBuilder.fChallenges.Count; SkillChallenge item = EncounterBuilder.fChallenges[num]; enc.SkillChallenges.Add(item.Copy() as SkillChallenge); return(true); }
static bool add_challenge(Encounter enc) { if (fChallenges.Count != 0) { int index = Session.Random.Next() % fChallenges.Count; SkillChallenge sc = fChallenges[index]; enc.SkillChallenges.Add(sc.Copy() as SkillChallenge); return(true); } return(false); }
public SkillChallengeBuilderForm(SkillChallenge sc) { InitializeComponent(); Application.Idle += new EventHandler(Application_Idle); fChallenge = sc.Copy() as SkillChallenge; update_all(); List <string> skill_names = Skills.GetSkillNames(); foreach (string skill in skill_names) { string ability = Skills.GetKeyAbility(skill).Substring(0, 3); string abbr = ability.Substring(0, 3); ListViewItem lvi = SkillSourceList.Items.Add(skill); ListViewItem.ListViewSubItem lvsi = lvi.SubItems.Add(abbr); lvi.UseItemStyleForSubItems = false; lvsi.ForeColor = SystemColors.GrayText; lvi.Group = SkillSourceList.Groups[0]; } List <string> ability_names = Skills.GetAbilityNames(); foreach (string ability in ability_names) { string abbr = ability.Substring(0, 3); ListViewItem lvi = SkillSourceList.Items.Add(ability); ListViewItem.ListViewSubItem lvsi = lvi.SubItems.Add(abbr); lvi.UseItemStyleForSubItems = false; lvsi.ForeColor = SystemColors.GrayText; lvi.Group = SkillSourceList.Groups[1]; } // Custom ListViewItem lvi_custom = SkillSourceList.Items.Add("(custom skill)"); ListViewItem.ListViewSubItem lvsi_custom = lvi_custom.SubItems.Add(""); lvi_custom.UseItemStyleForSubItems = false; lvsi_custom.ForeColor = SystemColors.GrayText; lvi_custom.Group = SkillSourceList.Groups[2]; }
public SkillChallengeDetailsForm(SkillChallenge sc) { this.InitializeComponent(); this.fChallenge = sc.Copy() as SkillChallenge; this.Browser.DocumentText = HTML.SkillChallenge(this.fChallenge, false, true, DisplaySize.Small); }