public ScenarioCardViewModel(ScenarioCard scenarioCard) { Title = scenarioCard.Title; EncounterSet = scenarioCard.EncounterSet; EncounterSetLink = string.Format("/Cards/Search?EncounterSet={0}", scenarioCard.EncounterSet.Replace(" ", "%20")); EncounterSetImage = scenarioCard.EncounterSetImage; Link = scenarioCard.Link; NormalQuantity = scenarioCard.NormalQuantity > 0 ? scenarioCard.NormalQuantity.ToString() : "-"; NightmareQuantity = scenarioCard.NightmareQuantity > 0 ? scenarioCard.NightmareQuantity.ToString() : "-"; EasyQuantity = scenarioCard.EasyQuantity > 0 ? scenarioCard.EasyQuantity.ToString() : "-"; }
public ScenarioCardViewModel(ScenarioCard scenarioCard) { Title = scenarioCard.Card.SlugIncludesType ? string.Format("{0} ({1})", scenarioCard.Title, scenarioCard.Card.CardType.ToString().Replace('_', ' ')) : scenarioCard.Title; EncounterSet = scenarioCard.EncounterSet; EncounterSetLink = string.Format("/Cards/Search?EncounterSet={0}", scenarioCard.EncounterSet.Replace(" ", "%20")); EncounterSetImage = scenarioCard.EncounterSetImage; Link = scenarioCard.Link; NormalQuantity = scenarioCard.NormalQuantity > 0 ? scenarioCard.NormalQuantity.ToString() : "-"; NightmareQuantity = scenarioCard.NightmareQuantity > 0 ? scenarioCard.NightmareQuantity.ToString() : "-"; EasyQuantity = scenarioCard.EasyQuantity > 0 ? scenarioCard.EasyQuantity.ToString() : "-"; NormalCount = scenarioCard.NormalQuantity; EasyCount = scenarioCard.EasyQuantity; NightmareCount = scenarioCard.NightmareQuantity; }
public void SetCampaignCard(Card card) { campaignCard = new ScenarioCard(card); }