ソースを参照

added console.clear

Alexander Hendrich 10 年 前
コミット
d32cbd239e
3 ファイル変更9 行追加2 行削除
  1. 1 1
      bbiwarg/Constants.cs
  2. 5 0
      bbiwarg/Utility/Logger.cs
  3. 3 1
      bbiwarg/Utility/Timer.cs

+ 1 - 1
bbiwarg/Constants.cs

@@ -12,7 +12,7 @@ namespace bbiwarg
     class Constants
     {
         // Logger
-        public static readonly LogSubject LogLevel = LogSubject.TouchEvents;
+        public static readonly LogSubject LogLevel = LogSubject.FingerTracker;
         public static readonly int ConsoleWidth = 90;
         public static readonly int ConsoleHeight = 30;
         

+ 5 - 0
bbiwarg/Utility/Logger.cs

@@ -29,5 +29,10 @@ namespace bbiwarg.Utility
             if (Constants.LogLevel.HasFlag(subject))
                 Console.WriteLine("Frame: " + CurrentFrame + "\t" + message);
         }
+
+        public static void clear(LogSubject subject) {
+            if (Constants.LogLevel.HasFlag(subject))
+                Console.Clear();
+        }
     }
 }

+ 3 - 1
bbiwarg/Utility/Timer.cs

@@ -41,7 +41,9 @@ namespace bbiwarg.Utility
                 name, sumTimes[name] / Math.Max(numTimes[name], 1), minTimes[name], maxTimes[name]), LogSubject.Timer);
         }
 
-        public static void outputAll() {
+        public static void outputAll()
+        {
+            Logger.clear(LogSubject.Timer);
             Logger.log("---TIMERS-START---", LogSubject.Timer);
             foreach (String name in stopwatches.Keys) {
                 output(name);