private void PrintTitle() { HTML.AppendLine("<h1>" + HistoricalFigure.Name + "</h1>"); string title = string.Empty; if (HistoricalFigure.Deity) { title = "Is a deity"; if (HistoricalFigure.WorshippedBy != null) { title += " that occurs in the myths of " + HistoricalFigure.WorshippedBy.ToLink() + ". "; } else { title += ". "; } title += HistoricalFigure.ToLink(false, HistoricalFigure) + " is most often depicted as a " + HistoricalFigure.GetRaceTitleString() + ". "; } else if (HistoricalFigure.Force) { title = "Is a force said to permeate nature. "; if (HistoricalFigure.WorshippedBy != null) { title += "Worshipped by " + HistoricalFigure.WorshippedBy.ToLink(); } } else { if (HistoricalFigure.DeathYear >= 0) { title += "Was a " + HistoricalFigure.GetRaceTitleString(); } else { title += "Is a " + HistoricalFigure.GetRaceTitleString(); } title += " born in " + HistoricalFigure.BirthYear; if (HistoricalFigure.DeathYear > 0) { HFDied death = HistoricalFigure.Events.OfType <HFDied>().First(hfDeath => hfDeath.HistoricalFigure == HistoricalFigure); title += " and died in " + HistoricalFigure.DeathYear + " (" + death.Cause.GetDescription() + ")"; if (death.Slayer != null) { title += " by " + death.Slayer.ToLink(); } else if (death.SlayerRace != "UNKNOWN" && death.SlayerRace != "-1") { title += " by a " + death.SlayerRace.ToLower(); } if (death.PrintParentCollection().Length > 0) { title += ", " + death.PrintParentCollection().Replace("In ", "in "); } } if (!title.EndsWith(". ")) { title += ". "; } title += LineBreak + "Caste: " + HistoricalFigure.Caste + LineBreak + "Type: " + HistoricalFigure.AssociatedType; } HTML.AppendLine("<b>" + title + "</b></br>"); }
private void PrintTitle() { Html.AppendLine("<h1>" + _historicalFigure.Name + "</h1>"); string title = string.Empty; if (_historicalFigure.Deity) { title = "Is a deity"; if (_historicalFigure.WorshippedBy != null) { title += " that occurs in the myths of " + _historicalFigure.WorshippedBy.ToLink() + ". "; } else { title += ". "; } title += _historicalFigure.ToLink(false, _historicalFigure) + " is most often depicted as a " + _historicalFigure.GetRaceTitleString() + ". "; } else if (_historicalFigure.Force) { title = "Is a force said to permeate nature. "; if (_historicalFigure.WorshippedBy != null) { title += "Worshipped by " + _historicalFigure.WorshippedBy.ToLink(); } } else { if (_historicalFigure.DeathYear >= 0) { title += "Was a " + _historicalFigure.GetRaceTitleString(); } else { title += "Is a " + _historicalFigure.GetRaceTitleString(); } title += " born in " + _historicalFigure.BirthYear; if (_historicalFigure.DeathYear > 0) { HfDied death = _historicalFigure.Events.OfType <HfDied>().First(hfDeath => hfDeath.HistoricalFigure == _historicalFigure); title += " and died in " + _historicalFigure.DeathYear + " (" + death.Cause.GetDescription() + ")"; if (death.Slayer != null) { title += " by " + death.Slayer.ToLink(); } else if (death.SlayerRace != "UNKNOWN" && death.SlayerRace != "-1") { title += " by a " + death.SlayerRace.ToLower(); } if (death.ParentCollection != null) { title += ", " + death.PrintParentCollection(); } } if (!title.EndsWith(". ")) { title += ". "; } } Html.AppendLine("<b>" + title + "</b></br>"); if (!string.IsNullOrWhiteSpace(_historicalFigure.Caste) && _historicalFigure.Caste != "Default") { Html.AppendLine("<b>Caste:</b> " + _historicalFigure.Caste + "</br>"); } if (!string.IsNullOrWhiteSpace(_historicalFigure.AssociatedType) && _historicalFigure.AssociatedType != "Standard") { Html.AppendLine("<b>Type:</b> " + _historicalFigure.AssociatedType + "</br>"); } }