예제 #1
0
        /// <summary>
        /// Запуск очистки лога
        /// </summary>
        public static void BeginThreadAvalable()
        {
            ThreadAvalable = new Thread(new ThreadStart(GetThreadAvalable));
            ThreadAvalable.IsBackground = true;
            ThreadAvalable.Start();

            //Tools.threadItems.AddItem(new ThreadItem(ThreadAvalable, "ThreadAvalable"));
            Logbook.FileAppend("ThreadAvalable.Start()", EventType.Trace);
        }
예제 #2
0
 public static void StopThreadAvalable()
 {
     try
     {
         if (ThreadAvalable != null)
         {
             ThreadAvalable.Abort();
             Logbook.FileAppend("ThreadAvalable.Abort()", EventType.Trace);
             ThreadAvalable = null;
         }
     }
     catch { }
 }
예제 #3
0
 public static void StopThreadSaveLog()
 {
     try
     {
         if (ThreadSaveLog != null)
         {
             ThreadSaveLog.Abort();
             Logbook.FileAppend("ThreadSaveLog.Abort()", EventType.Trace);
             ThreadSaveLog = null;
         }
     }
     catch { }
 }
예제 #4
0
 public static void BeginThreadSaveLog()
 {
     logInfo = new List <LogInfo>();
     IsLock  = new object();
     if (ThreadSaveLog != null)
     {
         ThreadSaveLog.Abort();
         ThreadSaveLog = null;
     }
     ThreadSaveLog = new Thread(new ThreadStart(GetThreadSaveLog));
     ThreadSaveLog.Start();
     Logbook.FileAppend("ThreadSaveLog.Start()", EventType.Trace);
 }