public static void WriteCombatReplayInterface(StreamWriter sw, Tuple <int, int> canvasSize, ParsedLog log)
        {
            string replayHTML = Properties.Resources.template_replay_html;

            replayHTML = replayHTML.Replace("${canvasX}", canvasSize.Item1.ToString());
            replayHTML = replayHTML.Replace("${canvasY}", canvasSize.Item2.ToString());
            replayHTML = replayHTML.Replace("${maxTime}", log.PlayerList.First().CombatReplay.Times.Last().ToString());
            List <int> groups       = log.PlayerList.Where(x => x.Account != ":Conjured Sword").Select(x => x.Group).Distinct().ToList();
            string     groupsString = "";

            foreach (int group in groups)
            {
                string replayGroupHTML = Properties.Resources.tmplGroupCombatReplay;
                replayGroupHTML = replayGroupHTML.Replace("${group}", group.ToString());;
                string playerString = "";
                foreach (Player p in log.PlayerList.Where(x => x.Group == group))
                {
                    string replayPlayerHTML = Properties.Resources.tmplPlayerSelectCombatReplay;
                    replayPlayerHTML = replayPlayerHTML.Replace("${instid}", p.InstID.ToString());
                    replayPlayerHTML = replayPlayerHTML.Replace("${playerName}", p.Character.Substring(0, Math.Min(10, p.Character.Length)));
                    replayPlayerHTML = replayPlayerHTML.Replace("${imageURL}", GeneralHelper.GetProfIcon(p.Prof));
                    replayPlayerHTML = replayPlayerHTML.Replace("${prof}", p.Prof);
                    playerString    += replayPlayerHTML;
                }
                replayGroupHTML = replayGroupHTML.Replace("<!--${players}-->", playerString);
                groupsString   += replayGroupHTML;
            }
            replayHTML = replayHTML.Replace("<!--${groups}-->", groupsString);
            sw.Write(replayHTML);
        }
        private void SetPlayers(JsonLog log)
        {
            log.Players = new List <JsonPlayer>();

            foreach (var player in _log.PlayerList)
            {
                log.Players.Add(new JsonPlayer
                {
                    Character           = player.Character,
                    Account             = player.Account,
                    Condition           = player.Condition,
                    Concentration       = player.Concentration,
                    Healing             = player.Healing,
                    Toughness           = player.Toughness,
                    Weapons             = player.GetWeaponsArray(_log).Where(w => w != null).ToArray(),
                    Group               = player.Group,
                    Profession          = player.Prof,
                    Dps1s               = Build1SDPS(player, null),
                    TargetDps1s         = Build1SDPS(player),
                    DpsAll              = BuildDPS(_statistics.DpsAll[player]),
                    DpsBoss             = BuildDPSBoss(_statistics.DpsBoss, player),
                    StatsAll            = BuildStatsAll(_statistics.StatsAll[player]),
                    StatsBoss           = BuildStatsBoss(_statistics.StatsBoss, player),
                    Defenses            = BuildDefenses(_statistics.Defenses[player]),
                    Rotation            = BuildRotation(player.GetCastLogs(_log, 0, _log.FightData.FightDuration)),
                    Support             = BuildSupport(_statistics.Support[player]),
                    SelfBuffs           = BuildBuffUptime(_statistics.SelfBoons[player], player),
                    GroupBuffs          = BuildBuffUptime(_statistics.GroupBoons[player], player),
                    OffGroupBuffs       = BuildBuffUptime(_statistics.OffGroupBoons[player], player),
                    SquadBuffs          = BuildBuffUptime(_statistics.SquadBoons[player], player),
                    Minions             = BuildMinions(player),
                    TotalDamageDist     = BuildDamageDist(player, null),
                    TargetDamageDist    = BuildDamageDist(player),
                    TotalDamageTaken    = BuildDamageTaken(player),
                    DeathRecap          = BuilDeathRecap(player),
                    Consumables         = BuildConsumables(player),
                    AvgBoonsStates      = BuildBuffStates(player.GetBoonGraphs(_log)[Boon.NumberOfBoonsID]),
                    AvgConditionsStates = BuildBuffStates(player.GetBoonGraphs(_log)[Boon.NumberOfConditionsID]),
                });
                if (_devMode)
                {
                    _actorIconData[player.Prof] = GeneralHelper.GetProfIcon(player.Prof);
                }
            }
        }
 public static void WriteBoonGenTableBody(StreamWriter sw, Player player, List <Boon> listToUse, Dictionary <long, string> boonArray)
 {
     sw.Write("<tr>");
     {
         sw.Write("<td>" + player.Group + "</td>");
         sw.Write("<td>" + "<img src=\"" + GeneralHelper.GetProfIcon(player.Prof) + "\" alt=\"" + player.Prof + "\" height=\"20\" width=\"20\" >" + "<span style=\"display:none\">" + player.Prof + "</span>" + "</td>");
         sw.Write("<td>" + player.Character + "</td>");
         foreach (Boon boon in listToUse)
         {
             if (boonArray.ContainsKey(boon.ID))
             {
                 sw.Write("<td>" + boonArray[boon.ID] + "</td>");
             }
             else
             {
                 sw.Write("<td>" + 0 + "</td>");
             }
         }
     }
     sw.Write("</tr>");
 }