/// <summary>
        /// Печать базы данных в консоль
        /// </summary>
        public override string ToString()
        {
            string rez = "      Id          Name        Surname  Age   Department    Salary    Project Amount\n";

            Workers.ForEach(x => rez += $"{x.Id,8}{x.Name,14}{x.Surname,15}{x.Age,5}{x.Departament,13}{x.Salary,10}{x.ProjectsAmount,18}\n");
            return(rez);
        }
Example #2
0
        } // StuffWorkers

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            Workers.ForEach(w => sb.Append(w));
            sb.Append($"Количество занятых работников: {CountOfBusyWorkers}\r\n");
            sb.Append($"Количество свободных работников: {CountOfFreeWorkers}\r\n");
            sb.Append($"Количество уволенных работников: {CountOfFiredWorkers}\r\n");
            return(sb.ToString());
        }
Example #3
0
 public void Tick()
 {
     if (IsActive)
     {
         Workers.ForEach(worker => {
             if (worker.IsAlive)
             {
                 Resources.AddYield(Yield);
             }
         });
     }
 }
Example #4
0
 public void StopWork()
 {
     PauseEvent.Set();
     Workers.ForEach(x => x.Item2.Cancel());
     RevertWorker?.Item2.Cancel();
 }