public override string Print()
        {
            Html = new StringBuilder();

            Html.AppendLine("<h1>" + _conquering.GetIcon() + " " + GetTitle() + "</h1></br>");

            Html.AppendLine(_conquering.GetYearTime() + "The " + _conquering.GetOrdinal(_conquering.Ordinal) + _conquering.ConquerType + " of " + _conquering.Site.ToLink() + " occurred as a result of " + _conquering.Battle.ToLink()
                            + (_conquering.ParentCollection == null ? "" : " in " + _conquering.ParentCollection.ToLink() + " waged by " + (_conquering.ParentCollection as War).Attacker.PrintEntity() + " on " + (_conquering.ParentCollection as War).Defender.PrintEntity())
                            + ".</br></br>");

            List <Bitmap> maps = MapPanel.CreateBitmaps(_world, _conquering);

            Html.AppendLine("<table>");
            Html.AppendLine("<tr>");
            Html.AppendLine("<td>" + MakeLink(BitmapToHtml(maps[0]), LinkOption.LoadMap) + "</td>");
            Html.AppendLine("<td>" + MakeLink(BitmapToHtml(maps[1]), LinkOption.LoadMap) + "</td>");
            Html.AppendLine("</tr></table></br>");

            Html.AppendLine("<b>" + _conquering.Attacker.PrintEntity() + " (Attacker)</b></br>");
            Html.AppendLine("<b>" + _conquering.Defender.PrintEntity() + " (Defender)</b></br></br>");

            PrintEventLog(_world, _conquering.GetSubEvents(), SiteConquered.Filters, _conquering);

            return(Html.ToString());
        }
Esempio n. 2
0
        public override string Print()
        {
            StringBuilder HTML = new StringBuilder();

            HTML.AppendLine("<basefont size=\"2\">");
            HTML.AppendLine("<style type=\"text/css\">"
                            + "a:link {text-decoration: none; color: #000000}"
                            + "a:visited {text-decoration: none; color: #000000}"
                            + "a:hover {text-decoration: underline; color: #000000}"
                            + "td {font-size: 13px;}"
                            + "ol { margin-top: 0;}"
                            + "ul { margin-top: 0;}"
                            + "img {border:none;}"
                            + "</style>");

            HTML.AppendLine(Conquering.GetYearTime() + "The " + Conquering.GetOrdinal(Conquering.Ordinal) + Conquering.ConquerType + " of " + Conquering.Site.ToLink() + " ocurred as a result of " + Conquering.Battle.ToLink()
                            + (Conquering.ParentCollection == null ? "" : " in " + Conquering.ParentCollection.ToLink() + " waged by " + (Conquering.ParentCollection as War).Attacker.PrintEntity() + " on " + (Conquering.ParentCollection as War).Defender.PrintEntity())
                            + ".</br></br>");

            List <System.Drawing.Bitmap> maps = MapPanel.CreateBitmaps(World, Conquering);

            HTML.AppendLine("<table border=\"0\" width=\"" + (maps[0].Width + maps[1].Width + 10) + "\">");
            HTML.AppendLine("<tr>");
            HTML.AppendLine("<td>" + MakeLink(BitmapToHTML(maps[0]), LinkOption.LoadMap) + "</td>");
            HTML.AppendLine("<td>" + MakeLink(BitmapToHTML(maps[1]), LinkOption.LoadMap) + "</td>");
            HTML.AppendLine("</tr></table></br>");

            HTML.AppendLine("<b>" + Conquering.Attacker.PrintEntity() + " (Attacker)</b></br>");

            HTML.AppendLine("<b>" + Conquering.Defender.PrintEntity() + " (Defender)</b></br></br>");

            HTML.AppendLine("<b>Event Log</b></br>");
            foreach (WorldEvent printEvent in Conquering.GetSubEvents())
            {
                if (!SiteConquered.Filters.Contains(printEvent.Type))
                {
                    HTML.AppendLine(printEvent.Print(true, Conquering) + "<br/><br/>");
                }
            }
            return(HTML.ToString());
        }