예제 #1
0
        private void UpdateProgress()
        {
            if ((startTime.Value - stopTime.Value).TotalDays > 0.1)
            {
                return;
            }

            var BInterfaces = BeamCutQuery.GetBeamCutInterfaces(bdevice.id, startTime.Value, stopTime.Value);

            if (BInterfaces == null || BInterfaces.Count == 0)
            {
                var binf = BeamCutQuery.GetLastInterface(bdevice.id);
                BInterfaces = new List <BeamCutInterface>(new BeamCutInterface[] { binf });
            }

            MachineProgressLoader.Controls.Clear();

            int row   = 0;
            int place = 1;

            foreach (var item in BInterfaces)
            {
                BeamInterface beamInterface = new BeamInterface(item, place);

                if (!beamInterface.Error)
                {
                    MachineProgressLoader.Controls.Add(beamInterface, 0, row);
                    place++;
                    row++;
                }
            }
        }