123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace bbiwarg.Utility
- {
- public enum LogSubject
- {
- None = 0,
- FingerDetector = 1,
- FingerTracker = 2,
- HandDetector = 4,
- PalmDetector = 8,
- TouchDetector = 16,
- TouchTracker = 32,
- TUIOServer = 64,
- Timer = 128,
- TouchEvents = 256,
- VideoControls = 512
- }
- static class Logger
- {
- public static int CurrentFrame { get; set; }
- public static void log(string message, LogSubject subject)
- {
- if (Constants.LogLevel.HasFlag(subject))
- Console.WriteLine("Frame: " + CurrentFrame + "\t" + message);
- }
- public static void clear(LogSubject subject)
- {
- if (Constants.LogLevel.HasFlag(subject))
- Console.Clear();
- }
- }
- }
|