Ejemplo n.º 1
0
 public SaleThread()
 {
     disposed = false;
     IsWork   = false;
     workArgs = new ThreadWorkEventArgs(this);
     Priority = ThreadPriority.Normal;
 }
Ejemplo n.º 2
0
        void Worker_Work(object sender, ThreadWorkEventArgs e)
        {
            while (!e.Cancel)
            {
                try
                {
                    DeleteOldFiles(Globals.GetPath(PathEnum.Logs), "*." + Globals.LogExtention, 30, SearchOption.TopDirectoryOnly);
                }
                catch
                {
                }

                // Период - 10 минут
                if (!e.Cancel)
                {
                    SaleThread.Sleep(600000);
                }
            }
        }