Exemple #1
0
 public void IncStat(string stat, Common.DebugLevel minLevel)
 {
     if (DebuggingLevel >= minLevel)
     {
         IncStat(stat);
     }
 }
Exemple #2
0
        public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(score);
            }

            if (!string.IsNullOrEmpty(stat))
            {
                stat = ": " + stat;
            }

            if ((Scenarios != null) && (Scenarios.TrackingID == ID))
            {
                Scenarios.Trace = true;
                try
                {
                    Scenarios.AddScoring(GetIDName() + stat, score, minLevel);
                }
                finally
                {
                    Scenarios.Trace = false;
                }
            }

            return(Manager.AddScoring(UnlocalizedName + stat, score, minLevel));
        }
Exemple #3
0
 public void SetDebuggingLevel(Common.DebugLevel value)
 {
     if (mDebugLevel != null)
     {
         mDebugLevel.SetValue(value);
     }
 }
Exemple #4
0
        public void IncStat(string stat, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return;
            }

            if ((Scenarios != null) && (Scenarios.TrackingID == ID))
            {
                Scenarios.Trace = true;
                try
                {
                    Scenarios.IncStat(GetIDName() + ": " + stat, minLevel);
                }
                finally
                {
                    Scenarios.Trace = false;
                }
            }

            if (Manager != null)
            {
                Manager.IncStat(UnlocalizedName + ": " + stat, minLevel);
            }
        }
Exemple #5
0
        public override float AddStat(string stat, float val, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(val);
            }

            if ((DebuggingEnabled) && (mTotalStats != null))
            {
                mTotalStats.AddStat(stat, val);
            }

            if ((minLevel == Common.DebugLevel.High) && (mStats != null) && (DebuggingLevel >= minLevel))
            {
                SimpleMessageDialog.Show(UnlocalizedName, stat);
                minLevel = Common.DebugLevel.Low;
            }

            if ((mStats != null) && (DebuggingLevel >= minLevel))
            {
                mStats.AddStat(stat, val);
            }

            return(val);
        }
Exemple #6
0
 public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
 {
     if (DebuggingLevel >= minLevel)
     {
         AddScoring(stat, (float)score);
     }
     return(score);
 }
Exemple #7
0
            protected override bool Allow(Common.DebugLevel value)
            {
                if (value == Common.DebugLevel.Logging)
                {
                    return(false);
                }

                return(base.Allow(value));
            }
Exemple #8
0
        public int AddStat(string stat, int val, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(val);
            }

            return((int)AddStat(stat, (float)val, minLevel));
        }
Exemple #9
0
        public static float AddStat(string stat, float val, Common.DebugLevel minLevel)
        {
            if (sStats == null)
            {
                return(val);
            }

            return(sStats.AddStat(stat, val, minLevel));
        }
Exemple #10
0
        public override void IncStat(string stat, Common.DebugLevel minLevel)
        {
            if (mTrack)
            {
                Track(stat);
            }

            base.IncStat(stat, minLevel);
        }
Exemple #11
0
        public override float AddStat(string stat, float val, Common.DebugLevel minLevel)
        {
            if (mTrack)
            {
                Track(stat + " (" + val + ")");
            }

            return(base.AddStat(stat, val, minLevel));
        }
Exemple #12
0
        public static void IncStat(string stat, Common.DebugLevel minLevel)
        {
            if (sStats == null)
            {
                return;
            }

            sStats.IncStat(stat, minLevel);
        }
Exemple #13
0
            public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
            {
                if (!Common.kDebugging)
                {
                    return(score);
                }

                return(mStats.AddScoring(mName + " " + stat, score, minLevel));
            }
Exemple #14
0
        public int AddStat(string stat, int val, Common.DebugLevel minLevel)
        {
            if (DebuggingLevel >= minLevel)
            {
                AddStat(stat, val);
            }

            return(val);
        }
Exemple #15
0
            public void IncStat(string stat, Common.DebugLevel minLevel)
            {
                if (!Common.kDebugging)
                {
                    return;
                }

                mStats.IncStat(mName + " " + stat, minLevel);
            }
Exemple #16
0
            public float AddStat(string stat, float val, Common.DebugLevel minLevel)
            {
                if (!Common.kDebugging)
                {
                    return(val);
                }

                return(mStats.AddStat(mName + " " + stat, val, minLevel));
            }
Exemple #17
0
            public int AddScoring(string scoring, SimDescription sim, Common.DebugLevel minLevel)
            {
                int score = ScoringLookup.GetScore(scoring, sim);

                if (!Common.kDebugging)
                {
                    return(score);
                }

                return(AddScoring(mName + " " + scoring, score, minLevel));
            }
Exemple #18
0
        public float AddStat(string stat, float val, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(val);
            }

            if ((Scenarios != null) && (Scenarios.TrackingID == ID))
            {
                Scenarios.Trace = true;
                try
                {
                    Scenarios.AddStat(GetIDName() + ": " + stat, val, minLevel);
                }
                finally
                {
                    Scenarios.Trace = false;
                }
            }

            return(Manager.AddStat(UnlocalizedName + ": " + stat, val, minLevel));
        }
Exemple #19
0
        public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return(score);
            }

            if (score > 0)
            {
                AddStat(stat + " Scoring Pos", score, minLevel);
            }
            else if (score < 0)
            {
                AddStat(stat + " Scoring Neg", score, minLevel);
            }
            else
            {
                AddStat(stat + " Scoring Zero", score, minLevel);
            }

            return(score);
        }
Exemple #20
0
        public override void IncStat(string stat, Common.DebugLevel minLevel)
        {
            if (!Common.kDebugging)
            {
                return;
            }

            if ((DebuggingEnabled) && (mTotalStats != null))
            {
                mTotalStats.IncStat(stat);
            }

            if ((minLevel == Common.DebugLevel.High) && (mStats != null) && (DebuggingLevel >= minLevel))
            {
                Common.Notify(stat);

                minLevel = Common.DebugLevel.Low;
            }

            if ((mStats != null) && (DebuggingLevel >= minLevel))
            {
                mStats.IncStat(stat);
            }
        }
Exemple #21
0
 public int AddScoring(string scoring, SimDescription sim, Common.DebugLevel minLevel)
 {
     return(AddScoring(scoring, ScoringLookup.GetScore(scoring, sim)));
 }
Exemple #22
0
 public void IncStat(string stat, Common.DebugLevel minLevel)
 {
     sStats.IncStat(stat);
 }
Exemple #23
0
 public float AddStat(string stat, float val, Common.DebugLevel minLevel)
 {
     return(sStats.AddStat(stat, val));
 }
Exemple #24
0
 public int AddStat(string stat, int val, Common.DebugLevel minLevel)
 {
     return((int)sStats.AddStat(stat, val));
 }
Exemple #25
0
 public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
 {
     return((int)sStats.AddScoring(stat, score));
 }
Exemple #26
0
 public void IncStat(string stat, Common.DebugLevel minLevel)
 {
     mManager.IncStat(stat, minLevel);
     mResult = stat;
 }
Exemple #27
0
 public int AddStat(string stat, int val, Common.DebugLevel minLevel)
 {
     mResult = stat + ": " + val;
     return(mManager.AddStat(stat, val, minLevel));
 }
Exemple #28
0
 public int AddScoring(string stat, int score, Common.DebugLevel minLevel)
 {
     mResult = stat + ": " + score;
     return(mManager.AddScoring(stat, score, minLevel));
 }
Exemple #29
0
 public int AddScoring(string scoring, int option, ScoringLookup.OptionType type, SimDescription sim, SimDescription other, Common.DebugLevel minLevel)
 {
     return(AddScoring(scoring, ScoringLookup.GetScore(scoring, option, type, sim, other), minLevel));
 }
Exemple #30
0
 public float AddStat(string stat, float val, Common.DebugLevel minLevel)
 {
     mEntry.Add(val);
     return(val);
 }