예제 #1
0
 /// <summary>
 /// Renders the object as a simple HTML report.
 /// </summary>
 public void Render()
 {
     MetricsBase = new MetricsBase(new PreStyleBreakdown(), Season) { DoBreakdowns = true };
      MetricsBase.Load(Season, skipPostseason:true);
      TeamList = MetricsBase.TeamList;
     var str = new SimpleTableReport( string.Format( "Balance Report {0}", Season ) );
     str.AddStyle(  "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" );
     str.AddStyle(  "#main { margin-left:1em; }" );
     str.AddStyle(  "#dtStamp { font-size:0.8em; }" );
     str.AddStyle(  ".end { clear: both; }" );
     str.AddStyle(  ".gponame { color:white; background:black }" );
     str.ColumnHeadings = true;
     str.DoRowNumbers = true;
     str.ShowElapsedTime = false;
     str.IsFooter = false;
     str.AddColumn( new ReportColumn( "Team",      "TEAM",   "{0}", typeof( String )       ) );
     str.AddColumn( new ReportColumn( "Rating",    "RATING", "{0}", typeof( String )       ) );
     str.AddColumn( new ReportColumn( "Plays",     "PLAYS",  "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Passes",    "PASSES", "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Runs",      "RUNS",   "{0}", typeof( Int32 ), true       ) );
     str.AddColumn( new ReportColumn( "Pass%",     "PPERCENT",  "{0:0.00}", typeof( decimal ), false ) );
     str.AddColumn( new ReportColumn( "Run%",      "RPERCENT",  "{0:0.00}", typeof( decimal ), false ) );
     str.AddColumn( new ReportColumn( "Tdp", "TDPASSES", "{0}", typeof( string ) ) );
     str.AddColumn( new ReportColumn( "Tdr", "TDRUNS", "{0}",   typeof( String ) ) );
     BuildTable( str );
     str.SetSortOrder( "PASSES DESC");
     str.RenderAsHtml( OutputFilename(), true );
 }
예제 #2
0
        /// <summary>
        /// Renders the object as a simple HTML report.
        /// </summary>
        public void Render()
        {
            MetricsBase = new MetricsBase(new PreStyleBreakdown(), Season)
            {
                DoBreakdowns = true
            };
            MetricsBase.Load(Season, skipPostseason: true);
            TeamList = MetricsBase.TeamList;
            var str = new SimpleTableReport(string.Format("Balance Report {0}", Season));

            str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }");
            str.AddStyle("#main { margin-left:1em; }");
            str.AddStyle("#dtStamp { font-size:0.8em; }");
            str.AddStyle(".end { clear: both; }");
            str.AddStyle(".gponame { color:white; background:black }");
            str.ColumnHeadings  = true;
            str.DoRowNumbers    = true;
            str.ShowElapsedTime = false;
            str.IsFooter        = false;
            str.AddColumn(new ReportColumn("Team", "TEAM", "{0}", typeof(String)));
            str.AddColumn(new ReportColumn("Rating", "RATING", "{0}", typeof(String)));
            str.AddColumn(new ReportColumn("Plays", "PLAYS", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Passes", "PASSES", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Runs", "RUNS", "{0}", typeof(Int32), true));
            str.AddColumn(new ReportColumn("Pass%", "PPERCENT", "{0:0.00}", typeof(decimal), false));
            str.AddColumn(new ReportColumn("Run%", "RPERCENT", "{0:0.00}", typeof(decimal), false));
            str.AddColumn(new ReportColumn("Tdp", "TDPASSES", "{0}", typeof(string)));
            str.AddColumn(new ReportColumn("Tdr", "TDRUNS", "{0}", typeof(String)));
            BuildTable(str);
            str.SetSortOrder("PASSES DESC");
            str.RenderAsHtml(OutputFilename(), true);
        }
예제 #3
0
        public BalanceReport(string season)
        {
            var breakdowns = new PreStyleBreakdown();

            MetricsBase = new MetricsBase(breakdowns)
            {
                DoBreakdowns = true
            };
            MetricsBase.Load(season);
            Season   = season;
            TeamList = MetricsBase.TeamList;
        }