using System; namespace bbiwarg.Utility { /// /// flags describing the different log subjects /// public enum LogSubject { None = 0, FingerDetector = 1, FingerTracker = 2, HandDetector = 4, PalmDetector = 8, TouchDetector = 16, TouchTracker = 32, TUIOServer = 64, TouchEvents = 128, VideoControls = 256, HandTracker = 512, PalmTracker = 1024 } /// /// Logs messages. /// internal static class Logger { /// /// the current frame /// public static int CurrentFrame { get; set; } /// /// May print a message depending on the subject and . /// /// the message /// the subject the message belongs to, determines if this message is printed public static void log(string message, LogSubject subject) { if (Parameters.LoggerEnabledSubjects.HasFlag(subject)) Console.WriteLine("Frame: " + CurrentFrame + "\t" + message); } } }