/// <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); }
public static void StopThreadSaveLog() { try { if (ThreadSaveLog != null) { ThreadSaveLog.Abort(); Logbook.FileAppend("ThreadSaveLog.Abort()", EventType.Trace); ThreadSaveLog = null; } } catch { } }
public static void StopThreadAvalable() { try { if (ThreadAvalable != null) { ThreadAvalable.Abort(); Logbook.FileAppend("ThreadAvalable.Abort()", EventType.Trace); ThreadAvalable = null; } } catch { } }
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); }