Example #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);
        }
Example #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);
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="PlayerBoxScore" /> class.
 /// </summary>
 /// <param name="dict">The dictionary containing the player box score.</param>
 /// <param name="playerID">The player ID.</param>
 /// <param name="teamID">The team.</param>
 /// <param name="playerName">The player's name.</param>
 public PlayerBoxScore(Dictionary <string, string> dict, int playerID, int teamID, string playerName = "")
 {
     PlayerID      = playerID;
     Name          = playerName;
     TeamID        = teamID;
     IsStarter     = IsStarter.TrySetValue(dict, "Starter", typeof(bool));
     PlayedInjured = PlayedInjured.TrySetValue(dict, "Injured", typeof(bool));
     IsOut         = IsOut.TrySetValue(dict, "DNP", typeof(bool));
     MINS          = MINS.TrySetValue(dict, "MINS", typeof(UInt16));
     PTS           = PTS.TrySetValue(dict, "PTS", typeof(UInt16));
     REB           = REB.TrySetValue(dict, "REB", typeof(UInt16));
     AST           = AST.TrySetValue(dict, "AST", typeof(UInt16));
     STL           = STL.TrySetValue(dict, "STL", typeof(UInt16));
     BLK           = BLK.TrySetValue(dict, "BLK", typeof(UInt16));
     TOS           = TOS.TrySetValue(dict, "TO", typeof(UInt16));
     FGM           = FGM.TrySetValue(dict, "FGM", typeof(UInt16));
     FGA           = FGA.TrySetValue(dict, "FGA", typeof(UInt16));
     TPM           = TPM.TrySetValue(dict, "3PM", typeof(UInt16));
     TPA           = TPA.TrySetValue(dict, "3PA", typeof(UInt16));
     FTM           = FTM.TrySetValue(dict, "FTM", typeof(UInt16));
     FTA           = FTA.TrySetValue(dict, "FTA", typeof(UInt16));
     OREB          = OREB.TrySetValue(dict, "OREB", typeof(UInt16));
     FOUL          = FOUL.TrySetValue(dict, "FOUL", typeof(UInt16));
 }
Example #4
0
 public MultiDimensionalModelVM(FGM m) : base(m)
 {
 }
Example #5
0
 public JoystickVM(FGM m) : base(m)
 {
 }
 public FlightInstrumentsVM(FGM m) : base(m)
 {
 }