Esempio n. 1
0
        public string TotalsToString(string formatString)
        {
            var min    = MinutesPlayed.ToString(CultureInfo.InvariantCulture);
            var fg     = FGM.ToString(CultureInfo.InvariantCulture) + "-" + FGA.ToString(CultureInfo.InvariantCulture);
            var threeP = ThreePM.ToString(CultureInfo.InvariantCulture) + "-" + ThreePA.ToString(CultureInfo.InvariantCulture);
            var ft     = FTM.ToString(CultureInfo.InvariantCulture) + "-" + FTA.ToString(CultureInfo.InvariantCulture);
            var pts    = Points.ToString(CultureInfo.InvariantCulture);
            var oreb   = OffRebounds.ToString(CultureInfo.InvariantCulture);
            var dreb   = DefRebounds.ToString(CultureInfo.InvariantCulture);
            var reb    = Rebounds.ToString(CultureInfo.InvariantCulture);
            var ast    = Assists.ToString(CultureInfo.InvariantCulture);
            var stl    = Steals.ToString(CultureInfo.InvariantCulture);
            var blk    = Blocks.ToString(CultureInfo.InvariantCulture);
            var to     = Turnovers.ToString(CultureInfo.InvariantCulture);
            var pf     = Fouls.ToString(CultureInfo.InvariantCulture);
            var pm     = PlusMinus.ToString(CultureInfo.InvariantCulture);
            var pip    = PointsInPaint.ToString(CultureInfo.InvariantCulture);
            var secChP = SecondChancePoints.ToString(CultureInfo.InvariantCulture);
            var fbPts  = FastBreakPoints.ToString(CultureInfo.InvariantCulture);
            var ptsTO  = PointsOffTurnovers.ToString(CultureInfo.InvariantCulture);
            var dunks  = Dunks.ToString(CultureInfo.InvariantCulture);
            var app    = Appearances.ToString(CultureInfo.InvariantCulture);

            string stats = string.Format(formatString, Desc, min, fg, threeP, ft, pts, oreb, dreb, reb, ast, stl, blk, to, pf, pm, pts, pip, secChP, fbPts, ptsTO, dunks, app);

            return(stats);
        }
Esempio n. 2
0
        public string ToString(string formatString, string gameTime)
        {
            //Concatenate the in game prefix (should show *SG* if in at SG) prior to the name
            var name = FullName;

            if (gameTime != "FINAL")
            {
                name = InGame + name;
            }
            var min       = MinutesPlayed.ToString(CultureInfo.InvariantCulture);
            var fg        = FGM.ToString(CultureInfo.InvariantCulture) + "-" + FGA.ToString(CultureInfo.InvariantCulture);
            var threeP    = ThreePM.ToString(CultureInfo.InvariantCulture) + "-" + ThreePA.ToString(CultureInfo.InvariantCulture);
            var ft        = FTM.ToString(CultureInfo.InvariantCulture) + "-" + FTA.ToString(CultureInfo.InvariantCulture);
            var pts       = Points.ToString(CultureInfo.InvariantCulture);
            var oreb      = OffRebounds.ToString(CultureInfo.InvariantCulture);
            var dreb      = DefRebounds.ToString(CultureInfo.InvariantCulture);
            var reb       = Rebounds.ToString(CultureInfo.InvariantCulture);
            var ast       = Assists.ToString(CultureInfo.InvariantCulture);
            var stl       = Steals.ToString(CultureInfo.InvariantCulture);
            var blk       = Blocks.ToString(CultureInfo.InvariantCulture);
            var to        = Turnovers.ToString(CultureInfo.InvariantCulture);
            var pf        = Fouls.ToString(CultureInfo.InvariantCulture);
            var pm        = PlusMinus.ToString(CultureInfo.InvariantCulture);
            var prf       = PointsResponsibleFor.ToString(CultureInfo.InvariantCulture);
            var pip       = PointsInPaint.ToString(CultureInfo.InvariantCulture);
            var secChP    = SecondChancePoints.ToString(CultureInfo.InvariantCulture);
            var fbPts     = FastBreakPoints.ToString(CultureInfo.InvariantCulture);
            var ptsTO     = PointsOffTurnovers.ToString(CultureInfo.InvariantCulture);
            var dunks     = Dunks.ToString(CultureInfo.InvariantCulture);
            var touches   = Touches.ToString(CultureInfo.InvariantCulture);
            var touchTime = Math.Round(TouchTime, 0, MidpointRounding.AwayFromZero).ToString(CultureInfo.InvariantCulture);

            var stats = string.Format(formatString, name, min, fg, threeP, ft, pts, oreb, dreb, reb, ast, stl, blk, to, pf, pm, prf, pip, secChP, fbPts, ptsTO, dunks, touches, touchTime);

            return(stats);
        }