public ThemeForm(EncounterCard card) { InitializeComponent(); Application.Idle += new EventHandler(Application_Idle); Browser.DocumentText = ""; fCard = card.Copy(); if (fCard.ThemeID != Guid.Empty) { MonsterTheme mt = Session.FindTheme(fCard.ThemeID, SearchType.Global); update_selected_theme(mt, false); ThemePowerData attack = mt.FindPower(fCard.ThemeAttackPowerID); AttackBox.SelectedItem = attack; ThemePowerData utility = mt.FindPower(fCard.ThemeUtilityPowerID); UtilityBox.SelectedItem = utility; } else { update_selected_theme(null, true); } }
/// <summary> /// Creates a copy of the slot. /// </summary> /// <returns>Returns the copy.</returns> public EncounterSlot Copy() { EncounterSlot slot = new EncounterSlot(); slot.ID = fID; slot.Card = fCard.Copy(); slot.Type = fType; foreach (CombatData ccd in fCombatData) { slot.CombatData.Add(ccd.Copy()); } return(slot); }
public ThemeForm(EncounterCard card) { this.InitializeComponent(); Application.Idle += new EventHandler(this.Application_Idle); this.Browser.DocumentText = ""; this.fCard = card.Copy(); if (this.fCard.ThemeID == Guid.Empty) { this.update_selected_theme(null, true); return; } MonsterTheme monsterTheme = Session.FindTheme(this.fCard.ThemeID, SearchType.Global); this.update_selected_theme(monsterTheme, false); ThemePowerData themePowerDatum = monsterTheme.FindPower(this.fCard.ThemeAttackPowerID); this.AttackBox.SelectedItem = themePowerDatum; ThemePowerData themePowerDatum1 = monsterTheme.FindPower(this.fCard.ThemeUtilityPowerID); this.UtilityBox.SelectedItem = themePowerDatum1; }