public new object Clone()
 {
     DeviceList NewList = new DeviceList();
     foreach (TimeDevice item in items)
     {
         NewList.Add((TimeDevice)item.Clone());
     }
     return NewList;
 }
 /// <summary>
 /// Получает временной шаг как минимальное время, оставшееся до конца операции из всех станков.
 /// </summary>
 /// <param name="SawtList">Список пил.</param>
 /// <param name="GrinderList">Список шлифвальных станков.</param>
 /// <returns></returns>
 private double GetStep(DeviceList SawtList, DeviceList GrinderList)
 {
     double MinSawTime = data.Saws.GetMinTime();
     double MinGrindTime = data.Grinders.GetMinTime();
     double Step = MinSawTime < MinGrindTime ? MinSawTime : MinGrindTime;
     return Step == 0 ? MinSawTime + MinGrindTime : Step;
 }
        /// <summary>
        /// Возвращает коллекцию свободных в данный момент пил поддерживающих
        /// заданный материал.
        /// </summary>
        /// <param name="MaterialId"></param>
        /// <returns></returns>
        public DeviceList GetFreeDeviceByMatType(int MaterialId)
        {
            DeviceList ResultList = new DeviceList();
            for (int i = 0; i < Count; i++)
            {
                if (this[i].IsSupportMaterial(MaterialId))
                {
                    if (!this[i].IsBusy())
                        ResultList.Add(this[i]);
                }
            }

            return ResultList;
        }
        /// <summary>
        /// Возвращает идентификатор устройства, настроенного на данный материал.
        /// </summary>
        /// <returns>Идентификатор устройства или -1</returns>
        public DeviceList GetFreeDeviceByMatTypeAndAfterTime(int MaterialId, double Time)
        {
            DeviceList ResultList = new DeviceList();

            for (int i = 0; i < Count; i++)
            {
                if (this[i].IsSupportMaterial(MaterialId))
                {
                    if (this[i].Time < Time)
                    {
                        ResultList.Add(this[i]);
                    }
                }
            }

            return ResultList;
        }
 public void Assign(Configuration Obj)
 {
     baseTime = Obj.baseTime;
     materials = (MaterialList)Obj.materials.Clone();
     saws = (DeviceList)Obj.saws.Clone();
     grinders = (DeviceList)Obj.grinders.Clone();
     productions = (ProductionList)Obj.productions.Clone();
     customers = (CustomerList)Obj.customers.Clone();
     orders = (OrderList)Obj.orders.Clone();
     tasks = (TaskList)Obj.tasks.Clone();
 }