コード例 #1
0
 private void TeamCells(StringBuilder sb, string[] teamCode)
 {
     AddLine(sb, HtmlLib.TableRowOpen());
     foreach (var team in teamCode)
     {
         RosterRpt(sb, team);
     }
     AddLine(sb, HtmlLib.TableRowClose());
 }
コード例 #2
0
 private void TopDogFor(
     StringBuilder sb,
     string position)
 {
     TableRowOpen(sb, rowName: $"{position} Top dogs");
     for (int i = 1; i < 18; i++)
     {
         AddLine(sb, HtmlLib.TableData(
                     TopDogLink(i, position)));
     }
     AddLine(sb, HtmlLib.TableRowClose());
 }
コード例 #3
0
        private string DivisionRow()
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            DivisionHeader(sb, "North");
            DivisionHeader(sb, "South");
            DivisionHeader(sb, "East");
            DivisionHeader(sb, "West");
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #4
0
        private string ConferenceRow(string conference)
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableDataAttr(
                        conference,
                        "colspan='24' align='center'"));
            AddLine(sb, HtmlLib.TableDataClose());
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #5
0
        private string TableHeader(string[] headerParams)
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            foreach (var item in headerParams)
            {
                AddLine(sb, HtmlLib.TableHeader(item));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #6
0
        private string PlayerProjections(string playerType)
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData($"{playerType} Projections"));
            for (int i = 0; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(PlayerProjection(i, playerType)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #7
0
        private string Standings()
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData("Standings"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(Standing(i)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #8
0
        private string GoalLineScores()
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData("Goalline scores"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(GoallineScore(i)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #9
0
        private string NibbleTips()
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData($"Nibble tips"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(NibbleTip(i)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #10
0
        private string PickupCharts()
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData("Pickup chart"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 22; i++)
            {
                AddLine(sb, HtmlLib.TableData(PickupChart(i)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #11
0
        private string RankingMetrics()
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData("Ranking Metrics"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(RankingMetric(i)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #12
0
        private string ScopeHeader(string whatScope)
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableRowHeaderOpen("width='100'"));
            AddLine(sb, whatScope);
            AddLine(sb, HtmlLib.TableRowHeaderClose());
            for (int i = 0; i < 22; i++)
            {
                AddLine(sb, HtmlLib.TableHeader($"{i:0#}"));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #13
0
        private string RoleAssignments()
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData("Role Assignments"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int w = 1; w < 18; w++)
            {
                AddLine(
                    sb,
                    HtmlLib.TableData(RoleAssignment(w)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #14
0
        private string Performance(
            string leagueId,
            string playerType)
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData($"{leagueId} Perf - {playerType}"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(
                            PlayerPerformance(
                                i,
                                playerType,
                                leagueId)));
            }
            AddLine(sb, HtmlLib.TableRowClose());

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData($"{leagueId} Perf - {playerType} last 4"));
            for (int i = 0; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(
                            PlayerPerformanceLast(
                                weeksToGoBack: 4,
                                weekNo: i,
                                playerType: playerType,
                                leagueId)));
            }
            AddLine(sb, HtmlLib.TableRowClose());

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData($"{leagueId} Perf - {playerType} last game"));
            for (int i = 0; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(
                            PlayerPerformanceLast(
                                weeksToGoBack: 1,
                                weekNo: i,
                                playerType: playerType,
                                leagueId)));
            }
            AddLine(sb, HtmlLib.TableRowClose());

            return(sb.ToString());
        }
コード例 #15
0
        private string PlayoffTeams()
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData($"Playoff Teams"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(
                            WeeklyLink(
                                week: i,
                                folder: "Playoffs",
                                fileStem: "Playoff-Week-")));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #16
0
        private string TopDefense()
        {
            var sb = new StringBuilder();

            TableRowOpen(sb, rowName: "In Form D");
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(DefenseLink(i, "Defensive Scoring")));
            }
            AddLine(sb, HtmlLib.TableRowClose());

            TableRowOpen(sb, rowName: "Patsies");
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(DefenseLink(i, "Team to beat")));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #17
0
        private string PickupSummaries(
            string leagueId)
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData(
                        $"Pickup summary - {leagueId}"));

            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 22; i++)
            {
                AddLine(sb, HtmlLib.TableData(
                            PickupSummary(
                                i,
                                leagueId)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }
コード例 #18
0
        private string TallyLine(string tallyName, string tally)
        {
            var sb = new StringBuilder();

            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData(tallyName));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(TallyLink(i, tally)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            AddLine(sb, HtmlLib.TableRowOpen());
            AddLine(sb, HtmlLib.TableData($"{tallyName}-YTD"));
            AddLine(sb, HtmlLib.TableData(string.Empty));
            for (int i = 1; i < 18; i++)
            {
                AddLine(sb, HtmlLib.TableData(TallyLink(i, tally, true)));
            }
            AddLine(sb, HtmlLib.TableRowClose());
            return(sb.ToString());
        }