Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public static void StopThreadSaveLog()
 {
     try
     {
         if (ThreadSaveLog != null)
         {
             ThreadSaveLog.Abort();
             Logbook.FileAppend("ThreadSaveLog.Abort()", EventType.Trace);
             ThreadSaveLog = null;
         }
     }
     catch { }
 }
Exemplo n.º 3
0
 public static void StopThreadAvalable()
 {
     try
     {
         if (ThreadAvalable != null)
         {
             ThreadAvalable.Abort();
             Logbook.FileAppend("ThreadAvalable.Abort()", EventType.Trace);
             ThreadAvalable = null;
         }
     }
     catch { }
 }
Exemplo n.º 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.IsBackground = true;
     ThreadSaveLog.Priority     = ThreadPriority.Highest;
     ThreadSaveLog.Start();
     Logbook.FileAppend("ThreadSaveLog.Start()", EventType.Trace);
 }