public override string ToLink(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null) { //if (link) //{ // string title = Type.GetDescription(); // title += "
"; // title += "Events: " + Events.Count; // string linkedString = ""; // if (pov != this) // { // linkedString = Icon + "<a href = \"structure#" + GlobalID + "\" title=\"" + title + "\">" + Name + "</a>"; // } // else // { // linkedString = Icon + "<a title=\"" + title + "\">" + HTMLStyleUtil.CurrentDwarfObject(Name) + "</a>"; // } // return linkedString; //} //else //{ // return Icon + Name; //} return(Name); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { linkedString = "<a href = \"collection#" + this.ID + "\"><font color=\"800000\">" + "The " + this.GetOrdinal(Ordinal) + ConquerType + " of " + Site.ToLink(false) + "</font></a>"; if (pov != Battle) { linkedString += " as a result of " + Battle.ToLink(); } } else { linkedString = "<font color=\"Blue\">" + "The " + this.GetOrdinal(Ordinal) + ConquerType + " of " + Site.ToLink(false) + "</font>"; } return(linkedString); } else { return("The " + this.GetOrdinal(Ordinal) + ConquerType + " of " + Site.ToLink(false)); } }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { string title = Attacker.PrintEntity(false) + " (Attacker)
" + Defender.PrintEntity(false) + " (Defender)
Deaths: " + DeathCount + " | (" + StartYear + " - "; if (EndYear == -1) { title += "Present)"; } else { title += EndYear + ")"; } linkedString = "<a href = \"collection#" + this.ID + "\" title=\"" + title + "\"><font color=\"#6E5007\">" + Name + "</font></a>"; } else { linkedString = "<font color=\"Blue\">" + Name + "</font>"; } return(linkedString); } else { return(Name); } }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string title = ""; if (DungeonType != DungeonType.Unknown) { title += DungeonType.GetDescription(); } else { title += Type.GetDescription(); } title += "
"; title += "Events: " + Events.Count; string linkedString = ""; if (pov != this) { linkedString = Icon + "<a href = \"structure#" + GlobalId + "\" title=\"" + title + "\">" + Name + "</a>"; } else { linkedString = Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>"; } return(linkedString); } return(Icon + Name); }
public override string ToLink(bool link = true, DwarfObject pov = null) { string name; if (Type == "Cavern") { name = "the depths of the world"; } else if (Type == "Underworld") { name = "the Underworld"; } else { name = "an underground region (" + Type + ")"; } if (link) { string title = Type; title += "
"; title += "Events: " + Events.Count; if (pov != this) { return(Icon + "<a href = \"uregion#" + Id + "\" title=\"" + title + "\">" + name + "</a>"); } return(Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(name) + "</a>"); } return(name); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (this == Unknown) { return(Name); } if (link) { string icon = GetIcon(); if (pov == null || pov != this) { if (pov != null && pov.GetType() == typeof(BeastAttack) && (pov as BeastAttack)?.Beast == this) //Highlight Beast when printing Beast Attack Log { return(icon + "<a href=\"hf#" + Id + "\" title=\"" + Title + "\"><font color=#339900>" + ShortName + "</font></a>"); } return("the " + RaceString + " " + icon + "<a href=\"hf#" + Id + "\" title=\"" + Title + "\">" + Name + "</a>"); } return("<a href=\"hf#" + Id + "\" title=\"" + Title + "\">" + HtmlStyleUtil.CurrentDwarfObject(ShortName) + "</a>"); } if (pov == null || pov != this) { return(RaceString + " " + Name); } return(ShortName); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { string title = Attacker.PrintEntity(false) + " (Attacker)"; if (Victor == Attacker) title += "(V)"; title += "
"; title += "Kills: " + DefenderDeathCount; title += "
"; title += Defender.PrintEntity(false) + " (Defender)"; if (Victor == Defender) title += "(V)"; title += "
"; title += "Kills: " + AttackerDeathCount; linkedString = "<a href = \"collection#" + this.ID + "\" title=\"" + title + "\"><font color=\"#6E5007\">" + Name + "</font></a>"; } else linkedString = "<font color=\"Blue\">" + Name + "</font>"; return linkedString; } else return Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string type = null; if (Type != WrittenContentType.Unknown) { type = Type.GetDescription(); } string title = "Written Content"; title += string.IsNullOrWhiteSpace(type) ? "" : ", " + type; title += "
"; title += "Events: " + Events.Count; string linkedString = ""; if (pov != this) { linkedString = Icon + "<a href = \"writtencontent#" + Id + "\" title=\"" + title + "\">" + Name + "</a>"; } else { linkedString = Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>"; } return(linkedString); } return(Name); }
public OwnerPeriod(Site site, DwarfObject newowner, int year, string cause) { Site = site; Owner = newowner; StartYear = year; StartCause = cause; EndYear = -1; if (Owner != null && Owner is Entity) ((Entity) Owner).AddOwnedSite(this); Site.OwnerHistory.Add(this); }
public string Print(bool link = true, DwarfObject pov = null, WorldEvent worldEvent = null) { var identityString = "the "; if (Race != null && Race != CreatureInfo.Unknown) { identityString += Race.NameSingular.ToLower(); } else { identityString += HistoricalFigure.GetRaceString(); } if (!string.IsNullOrWhiteSpace(Profession)) { identityString += " " + Profession.ToLower(); } var icon = !string.IsNullOrWhiteSpace(Caste) ? GetIcon() : HistoricalFigure.GetIcon(); if (!string.IsNullOrWhiteSpace(icon)) { identityString += " " + icon; } identityString += " " + Name; if (Entity != null) { identityString += " of "; identityString += Entity.ToLink(link, pov, worldEvent); } return(identityString); }
public override string ToLink(bool link = true, DwarfObject pov = null) { string name; if (this.Type == "Cavern") { name = "the depths of the world"; } else if (this.Type == "Underworld") { name = "the Underworld"; } else { name = "an underground region (" + this.Type + ")"; } if (link) { if (pov != this) { return("<a href = \"uregion#" + this.ID + "\">" + name + "</a>"); } else { return(HTMLStyleUtil.CurrentDwarfObject(name)); } } else { return(name); } }
public override string ToLink(bool link = true, DwarfObject pov = null) { string name = ""; name = "The " + GetOrdinal(Ordinal) + "rampage of "; if (Beast != null && pov == Beast) name += Beast.ToLink(false, Beast); else if (Beast != null) name += Beast.Name; else name += "UNKNOWN BEAST"; if (pov != Site) name += " in " + Site.ToLink(false); if (link) { string linkedString = ""; if (pov != this) { string title = "Events: " + GetSubEvents().Count; linkedString = "<a href = \"collection#" + this.ID + "\" title=\"" + title + "\"><font color=\"#336600\">" + name + "</font></a>"; } else linkedString = "<font color=\"Blue\">" + name + "</font>"; return linkedString; } else if (pov == this) return "Rampage of " + Beast.ToLink(false, Beast); return name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string title; if (IsCiv) { title = "Civilization of " + Race; } else { title = "Group of " + Race; } if (Parent != null) { title += ", of " + Parent.Name; } if (pov != this) { return(Icon + "<a href = \"entity#" + Id + "\" title=\"" + title + "\">" + Name + "</a>"); } return(Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>"); } return(Name); }
public override string ToLink(bool link = true, DwarfObject pov = null) { return "an abduction"; /*string colString = this.GetYearTime(true) + "The " + ordinals[numeral] + " abduction of "; if (abductee != null) colString += abductee.ToLink(path, pov); else colString += "UNKNOWN FIGURE"; return colString + " in " + period.ToLink(path, pov) + " ocurred";*/ }
public override string ToLink(bool link = true, DwarfObject pov = null) { return("an abduction"); /*string colString = this.GetYearTime(true) + "The " + ordinals[numeral] + " abduction of "; * if (abductee != null) colString += abductee.ToLink(path, pov); * else colString += "UNKNOWN FIGURE"; * return colString + " in " + period.ToLink(path, pov) + " ocurred";*/ }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (Name != "") { return(Name); } return("(" + StartYear + " - " + EndYear + ")"); }
public string Print(bool link = true, DwarfObject pov = null) { if (Structure != null) { return(Structure.ToLink(link, pov)); } return("a " + Type.GetDescription()); }
public OwnerPeriod(Site site, DwarfObject newowner, int year, string cause) { Site = site; Owner = newowner; StartYear = year; StartCause = cause; EndYear = -1; if (Owner != null && Owner is Entity) { ((Entity)Owner).AddOwnedSite(this); } Site.OwnerHistory.Add(this); }
public string ToTreeLeafLink(DwarfObject pov = null) { string dead = DeathYear != -1 ? "<br/>" + HtmlStyleUtil.SymbolDead : ""; if (pov == null || pov != this) { return("<a " + (Deity ? "class=\"hf_deity\"" : "") + " href=\"hf#" + Id + "\" title=\"" + Title + "\">" + Race + (Deity ? " Deity" : "") + "<br/>" + Name + dead + "</a>"); } return("<a " + (Deity ? "class=\"hf_deity\"" : "") + " title=\"" + Title + "\">" + Race + (Deity ? " Deity" : "") + "<br/>" + HtmlStyleUtil.CurrentDwarfObject(Name) + dead + "</a>"); }
public string PrintEntity(bool link = true, DwarfObject pov = null) { string entityString = ToLink(link, pov); if (Parent != null) { entityString += " of " + Parent.ToLink(link, pov); } return(entityString); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { if (pov != this) { return(Icon + "<a href = \"entity#" + Id + "\" title=\"" + GetToolTip() + "\">" + Name + "</a>"); } return(Icon + "<a title=\"" + GetToolTip() + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>"); } return(Name); }
public void AddPlayerRelatedDwarfObjects(DwarfObject dwarfObject) { if (dwarfObject == null) { return; } if (PlayerRelatedObjects.Contains(dwarfObject)) { return; } PlayerRelatedObjects.Add(dwarfObject); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (this == HistoricalFigure.Unknown) { return(this.Name); } if (link) { if ((pov == null || pov != this)) { string title = Caste + ", " + AssociatedType + " (" + BirthYear + " - "; if (DeathYear == -1) { title += "Present)"; } else { title += DeathYear + ")"; } title += "
Events: " + Events.Count; if (pov != null && pov.GetType() == typeof(BeastAttack) && (pov as BeastAttack).Beast == this) //Highlight Beast when printing Beast Attack Log { if (this.Name.IndexOf(" ") > 0) { return("<a href=\"hf#" + this.ID + "\" title=\"" + title + "\"><font color=#339900>" + this.Name.Substring(0, this.Name.IndexOf(" ")) + "</font></a>"); } else { return("<a href=\"hf#" + this.ID + "\" title=\"" + title + "\"><font color=#339900>" + this.Name + "</font></a>"); } } else { return("the " + GetRaceString() + " " + "<a href = \"hf#" + this.ID + "\" title=\"" + title + "\">" + this.Name + "</a>"); } } else { return(HTMLStyleUtil.CurrentDwarfObject(Name.IndexOf(" ") > 0 ? Name.Substring(0, Name.IndexOf(" ")) : Name)); } } else if ((pov == null || pov != this)) { return(GetRaceString() + " " + Name); } else { return(Name.IndexOf(" ") > 0 ? Name.Substring(0, Name.IndexOf(" ")) : Name); } }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { if (pov != this) { string title = Type + " | Events: " + Events.Count; return "<a href = \"region#" + this.ID + "\" title=\"" + title + "\">" + this.Name + "</a>"; } else return "<font color=\"Blue\">" + this.Name + "</font>"; } else return this.Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string title = "Artifact" + (!string.IsNullOrEmpty(Type) ? ", " + Type : ""); title += "
"; title += "Events: " + Events.Count; if (pov != this) { return(Icon + "<a href = \"artifact#" + Id + "\" title=\"" + title + "\">" + Name + "</a>"); } return(Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>"); } return(Name); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { if (pov != this) { string title = Type + " | Events: " + Events.Count; return "<a href = \"region#" + this.ID + "\" title=\"" + title + "\">" + this.Name + "</a>"; } else return HTMLStyleUtil.CurrentDwarfObject(Name); } else return this.Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string title = Type; title += "
"; title += "Events: " + Events.Count; if (pov != this) { return(Icon + "<a href = \"region#" + Id + "\" title=\"" + title + "\">" + Name + "</a>"); } return(Icon + "<a title=\"" + title + "\">" + HtmlStyleUtil.CurrentDwarfObject(Name) + "</a>"); } return(Name); }
public OwnerPeriod(Site site, DwarfObject owner, int startYear, string startCause) { Site = site; Owner = owner; StartYear = startYear; StartCause = startCause; EndYear = -1; if (Owner is Entity entity) { entity.AddOwnedSite(this); } else { Console.WriteLine(); } }
public override string ToLink(bool link = true, DwarfObject pov = null) { string name; if (this.Type == "Cavern") name = "the depths of the world"; else if (this.Type == "Underworld") name = "the Underworld"; else name = "an underground region (" + this.Type + ")"; if (link) { if (pov != this) return "<a href = \"uregion#" + this.ID + "\">" + name + "</a>"; else return HTMLStyleUtil.CurrentDwarfObject(name); } else return name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { //if (link) //{ // string linkedString = ""; // if (pov != this) // { // string title = "Events: " + this.Events.Count; // linkedString = "<a href = \"structure#" + this.ID + "\" title=\"" + title + "\">" + Name + "</a>"; // } // else // linkedString = HTMLStyleUtil.CurrentDwarfObject(Name); // return linkedString; //} //else return Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { linkedString = "<a href = \"collection#" + this.ID + "\"><font color=\"800000\">" + "The " + this.GetOrdinal(Ordinal) + ConquerType + " of " + Site.ToLink(false) + "</font></a>"; if (pov != Battle) linkedString += " as a result of " + Battle.ToLink(); } else linkedString = "<font color=\"Blue\">" + "The " + this.GetOrdinal(Ordinal) + ConquerType + " of " + Site.ToLink(false) + "</font>"; return linkedString; } else return "The " + this.GetOrdinal(Ordinal) + ConquerType + " of " + Site.ToLink(false); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { string title = "Events: " + this.Events.Count; linkedString = "<a href = \"artifact#" + this.ID + "\" title=\"" + title + "\">" + Name + "</a>"; } else linkedString = "<font color=\"Blue\">" + Name + "</font>"; return linkedString; } else return Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { string title = "Events: " + this.Events.Count; linkedString = "<a href = \"worldconstruction#" + this.ID + "\" title=\"" + title + "\">" + Name + "</a>"; } else linkedString = HTMLStyleUtil.CurrentDwarfObject(Name); return linkedString; } else return Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { //if (link) //{ // string linkedString = ""; // if (pov != this) // { // string title = "Events: " + this.Events.Count; // linkedString = "<a href = \"structure#" + this.ID + "\" title=\"" + title + "\">" + Name + "</a>"; // } // else // linkedString = HTMLStyleUtil.CurrentDwarfObject(Name); // return linkedString; //} //else return(Name); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { if (pov != this) { string title = Type + " | Events: " + Events.Count; return("<a href = \"region#" + this.ID + "\" title=\"" + title + "\">" + this.Name + "</a>"); } else { return("<font color=\"Blue\">" + this.Name + "</font>"); } } else { return(this.Name); } }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { if (pov != this) { string title = Type + "
Events: " + Events.Count; return("<a href = \"site#" + this.ID + "\" title=\"" + title + "\">" + this.Name + "</a>"); } else { return(HTMLStyleUtil.CurrentDwarfObject(Name)); } } else { return(Name); } }
public override string ToLink(bool link = true, DwarfObject pov = null) { string name = ""; name = "The " + GetOrdinal(Ordinal) + "rampage of "; if (Beast != null && pov == Beast) { name += Beast.ToLink(false, Beast); } else if (Beast != null) { name += Beast.Name; } else { name += "UNKNOWN BEAST"; } if (pov != Site) { name += " in " + Site.ToLink(false); } if (link) { string linkedString = ""; if (pov != this) { string title = "Events: " + GetSubEvents().Count; linkedString = "<a href = \"collection#" + this.ID + "\" title=\"" + title + "\"><font color=\"#336600\">" + name + "</font></a>"; } else { linkedString = "<font color=\"Blue\">" + name + "</font>"; } return(linkedString); } else if (pov == this) { return("Rampage of " + Beast.ToLink(false, Beast)); } return(name); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { string title = "Dance Form"; title += "
"; title += "Events: " + Events.Count; linkedString = Icon + "<a href=\"danceform#" + Id + "\" title=\"" + title + "\">" + Name + "</a>"; } else { linkedString = Icon + HtmlStyleUtil.CurrentDwarfObject(Name); } return(linkedString); } return(Name); }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { if (pov != this) { string title = ""; if (IsCiv) { title = "Civilization of " + Race; } else { title = "Group of " + Race; } if (Parent != null) { title += ", of " + Parent.Name; } string entityLink = "<a href = \"entity#" + ID + "\" title=\"" + title + "\">" + Name + "</a>"; if (IsCiv) { return(PrintIdenticon() + " " + entityLink + " "); } else { return(entityLink); } } else { return(HTMLStyleUtil.CurrentDwarfObject(Name)); } } else { return(Name); } }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { string title = "Events: " + this.Events.Count; linkedString = "<a href = \"artifact#" + this.ID + "\" title=\"" + title + "\">" + Name + "</a>"; } else { linkedString = "<font color=\"Blue\">" + Name + "</font>"; } return(linkedString); } else { return(Name); } }
public static List<Bitmap> CreateBitmaps(World world, DwarfObject dwarfObject) { int maxSize = world.PageMiniMap.Height > world.PageMiniMap.Width ? world.PageMiniMap.Height : world.PageMiniMap.Width; MapPanel createBitmaps = new MapPanel(world.Map, world, null, dwarfObject); createBitmaps.Height = maxSize; createBitmaps.Width = maxSize; if (createBitmaps.ZoomToBoundsOnFirstPaint) createBitmaps.ZoomToBounds(); createBitmaps.MiniMapAreaSideLength = maxSize; //createBitmaps.SetupMinimap(); createBitmaps.Minimap = world.PageMiniMap; Bitmap miniMap = new Bitmap(maxSize, maxSize); using (Graphics miniMapGraphics = Graphics.FromImage(miniMap)) createBitmaps.DrawMiniMap(miniMapGraphics); Bitmap map = new Bitmap(maxSize, maxSize); using (Graphics mapGraphics = Graphics.FromImage(map)) { //mapGraphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; mapGraphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half; createBitmaps.DrawMap(mapGraphics); createBitmaps.DrawDisplayObjects(mapGraphics); createBitmaps.Dispose(); return new List<Bitmap>() { map, miniMap }; } }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { string linkedString = ""; if (pov != this) { string title = Attacker.PrintEntity(false) + " (Attacker)
" + Defender.PrintEntity(false) + " (Defender)
Deaths: " + DeathCount + " | (" + StartYear + " - "; if (EndYear == -1) title += "Present)"; else title += EndYear + ")"; linkedString = "<a href = \"collection#" + this.ID + "\" title=\"" + title + "\"><font color=\"#6E5007\">" + Name + "</font></a>"; } else linkedString = "<font color=\"Blue\">" + Name + "</font>"; return linkedString; } else return Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { return "a duel"; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { if (pov != this) { string title = ""; if (IsCiv) title = "Civilization of " + Race; else title = "Group of " + Race; if (Parent != null) title += ", of " + Parent.Name; string entityLink = "<a href = \"entity#" + this.ID + "\" title=\"" + title + "\">" + this.Name + "</a>"; if (IsCiv) return entityLink + " " + PrintIdenticon() + " "; else return entityLink; } else return "<font color=\"Blue\">" + this.Name + "</font>"; } else return this.Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (this == HistoricalFigure.Unknown) return this.Name; if (link) if ((pov == null || pov != this)) { string title = Caste + ", " + AssociatedType + " (" + BirthYear + " - "; if (DeathYear == -1) title += "Present)"; else title += DeathYear + ")"; title += "
Events: " + Events.Count; if (pov != null && pov.GetType() == typeof(BeastAttack) && (pov as BeastAttack).Beast == this) //Highlight Beast when printing Beast Attack Log if (this.Name.IndexOf(" ") > 0) return "<a href = \"hf#" + this.ID + "\" title=\"" + title + "\"><font color=#339900>" + this.Name.Substring(0, this.Name.IndexOf(" ")) + "</font></a>"; else return "<a href = \"hf#" + this.ID + "\" title=\"" + title + "\"><font color=#339900>" + this.Name + "</font></a>"; else return "the " + GetRaceString() + " " + "<a href = \"hf#" + this.ID + "\" title=\"" + title + "\">" + this.Name + "</a>"; } else// (pov != null && pov.ID == this.ID) if (this.Name.IndexOf(" ") > 0) return "<font color=\"Blue\">" + this.Name.Substring(0, this.Name.IndexOf(" ")) + "</font>"; else return "<font color=\"Blue\">" + this.Name + "</font>"; else if ((pov == null || pov != this)) return GetRaceString() + " " + this.Name; else //(pov != null && pov.ID == this.ID) if (this.Name.IndexOf(" ") > 0) return this.Name.Substring(0, this.Name.IndexOf(" ") + 1); else return this.Name; }
public ChartControl(World world, DwarfObject focusObject, DwarfTabControl dwarfTabControl) { World = world; FocusObject = focusObject; TabControl = dwarfTabControl; Title = "Chart"; if (FocusObject != null) Title += " - " + FocusObject.ToLink(false, FocusObject); }
public ChartPanel(World world, DwarfObject focusObject, List<ChartOption> options = null) { Dock = DockStyle.Fill; FocusObject = focusObject as DwarfObject; World = world; DwarfChart = new Chart(); DwarfChart.Dock = DockStyle.Fill; Controls.Add(DwarfChart); this.Refresh(); DwarfChart.BackColor = Color.Wheat; DwarfChart.BackGradientStyle = GradientStyle.TopBottom; DwarfChart.ChartAreas.Add(new ChartArea()); DwarfChart.ChartAreas.Last().AxisX.IntervalAutoMode = IntervalAutoMode.VariableCount; DwarfChart.ChartAreas.Last().BackColor = Color.FromArgb(235, 235, 235); DwarfChart.Legends.Add(new Legend()); DwarfChart.Legends.Last().LegendStyle = LegendStyle.Row; DwarfChart.Legends.Last().Position.Width = 100; DwarfChart.Legends.Last().Position.Y = 100; DwarfChart.Legends.Last().Position.Height = 4; DwarfChart.Titles.Add(new Title()); DwarfChart.Titles.Last().Position.Auto = false; DwarfChart.Titles.Last().Position.X = 50; DwarfChart.Titles.Last().Position.Y = 1.5f; if (options != null) SeriesOptions = options; else if (FocusObject.GetType() == typeof(Battle)) SeriesOptions.Add(ChartOption.OtherBattleRemaining); else { SeriesOptions.Add(ChartOption.TimelineEvents); SeriesOptions.Add(ChartOption.TimelineEventsFiltered); } SetupMenu(); //GenerateSeries(); }
protected string MakeLink(string text, DwarfObject dObject, ControlOption option = ControlOption.HTML) { //<a href=\"collection#" + attack.ID + "\">" + attack.GetOrdinal(attack.Ordinal) string objectType = ""; int id = 0; if (dObject is EventCollection) { objectType = "collection"; id = (dObject as EventCollection).ID; } else if (dObject.GetType() == typeof(HistoricalFigure)) { objectType = "hf"; id = (dObject as HistoricalFigure).ID; } else if (dObject.GetType() == typeof(Entity)) { objectType = "entity"; id = (dObject as Entity).ID; } else if (dObject.GetType() == typeof(WorldRegion)) { objectType = "region"; id = (dObject as WorldRegion).ID; } else if (dObject.GetType() == typeof(UndergroundRegion)) { objectType = "uregion"; id = (dObject as UndergroundRegion).ID; } else if (dObject.GetType() == typeof(Site)) { objectType = "site"; id = (dObject as Site).ID; } else throw new Exception("Unhandled make link for type: " + dObject.GetType()); string optionString = ""; if (option != ControlOption.HTML) optionString = "-" + option.ToString(); return "<a href=\"" + objectType + "#" + id + optionString + "\">" + text + "</a>"; }
protected void PrintEventLog(List<WorldEvent> events, List<string> filters, DwarfObject dfo) { if (!events.Any()) { return; } HTML.AppendLine("<b>Event Log</b> " + MakeLink(Font("[Chart]", "Maroon"), LinkOption.LoadChart) + "<br/><br/>"); foreach (var e in events) { if (filters == null || !filters.Contains(e.Type)) { HTML.AppendLine(e.Print(true, dfo) + "<br /><br />"); } } }
public override string ToLink(bool link = true, DwarfObject pov = null) { return "a "+(!string.IsNullOrWhiteSpace(Adjective) ? Adjective.ToLower()+" " : "")+"purge"; }
public virtual string ToLink(bool link = true, DwarfObject pov = null) { return ""; }
public string PrintEntity(bool link = true, DwarfObject pov = null) { string entityString = this.ToLink(link, pov); if (this.Parent != null) entityString += " of " + Parent.ToLink(link, pov); return entityString; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (link) { if (pov != this) { string title = ""; if (IsCiv) { title = "Civilization of " + Race; } else { title = "Group of " + Race; } if (Parent != null) { title += ", of " + Parent.Name; } string entityLink = "<a href = \"entity#" + ID + "\" title=\"" + title + "\">" + Name + "</a>"; if (IsCiv) { return PrintIdenticon() + " " + entityLink + " "; } else { return entityLink; } } else return HTMLStyleUtil.CurrentDwarfObject(Name); } else return Name; }
public override string ToLink(bool link = true, DwarfObject pov = null) { if (Name != "") return Name; else return "(" + StartYear + " - " + EndYear + ")"; }