Example #1
0
        public BeltSorterDivert(BeltSorterDivertInfo info) : base(info)
        {
            beltSorterDivertInfo = info;

            if (info.type == DivertType.PopUp)
            {
                arrow.Dispose();
            }

            StraightBeltConveyorInfo divertSectionInfo = new StraightBeltConveyorInfo()
            {
                Length    = info.divertConveyorLength,
                thickness = info.thickness,
                Width     = info.width,
                Speed     = info.Speed,
                color     = info.color
            };

            divertSection = new StraightBeltConveyor(divertSectionInfo);
            divertSection.startLine.Visible     = false;
            divertSection.StartFixPoint.Visible = false;
            divertSection.StartFixPoint.Enabled = false;

            Add(divertSection);

            TransportSection.Route.InsertActionPoint(apStraight);
            divertSection.TransportSection.Route.InsertActionPoint(apDivert, 0);

            apStraight.OnEnter += apStraight_OnEnter;

            if (beltControl.LineReleasePhotocell != null)
            {
                beltControl.LineReleasePhotocell.Dispose();
            }

            if (divertSection.beltControl.LineReleasePhotocell != null)
            {
                divertSection.beltControl.LineReleasePhotocell.Dispose();
            }

            DivertAngle          = info.divertAngle;
            Length               = info.length;
            DivertConveyorOffset = info.divertConveyorOffset;

            UpdateConveyor();
        }
Example #2
0
 public StraightBeltConveyor(StraightBeltConveyorInfo info) : base(info)
 {
     straightBeltInfo = info;
     beltControl      = new BeltControl(this);
 }