コード例 #1
0
 public ProgressLogger(int max, string message)
 {
     Max     = max;
     Message = message;
     current = 0;
     done    = false;
     Thread  = System.Threading.Thread.CurrentThread;
     timer   = new Stopwatch();
     timer.Start();
     ProgramLog.AddProgressLogger(this);
 }
コード例 #2
0
 public override void WriteLine(string text)
 {
     if (cache != null && cache.Length > 0)
     {
         cache.Append(text);
         ProgramLog.Log(cache.ToString());
         cache.Clear();
     }
     else
     {
         ProgramLog.Log(text);
     }
 }
コード例 #3
0
 public static void Print(string text)
 {
     ProgramLog.Write(new LogEntry {
         target = console, message = text, thread = Thread.CurrentThread
     });
 }
コード例 #4
0
 public static void Print(string text, params object[] args)
 {
     ProgramLog.Write(new LogEntry {
         target = console, message = String.Format(text, args), thread = Thread.CurrentThread
     });
 }
コード例 #5
0
 public void Log(string fmt, SendingLogger logger, params object[] args)
 {
     ProgramLog.Log(this, fmt, args);
 }
コード例 #6
0
 public void Log(string fmt, params object[] args)
 {
     ProgramLog.Log(this, fmt, args);
 }
コード例 #7
0
 public void Log(string text, SendingLogger logger)
 {
     ProgramLog.Log(this, text, logger);
 }
コード例 #8
0
 public void Log(string text)
 {
     ProgramLog.Log(this, text, SendingLogger.CONSOLE);
 }
コード例 #9
0
 public void Log(string text, bool multi = false)
 {
     ProgramLog.Log(this, text, multi);
 }