示例#1
0
        private ICBLineStructure ExportIndividualDrawerLine(int drawerNumber)
        {
            var design       = DuraformEnquiry.DuraformDesign;
            var topOffset    = (int)(design.BT / 2 - design.DrawerBorderOffset);
            var bottomOffset = (int)(design.BB / 2 - design.DrawerBorderOffset);

            var line = new ICBLineStructure(this)
            {
                TYPE     = ICB_TYPE_ENUM.DOOR,
                BT       = drawerNumber == 1 ? design.BT : topOffset,
                BB       = NumberOfDrawers == drawerNumber ? design.BB : bottomOffset,
                QUANTITY = 1
            };

            line.EDGE_TOP    = drawerNumber == 1 ? line.EDGE_TOP : 0;
            line.EDGE_BOTTOM = NumberOfDrawers == drawerNumber ? line.EDGE_BOTTOM : 0;

            line.DIMX = drawerNumber switch
            {
                1 => (int)(DrawerOne ?? 0),
                2 => (int)(DrawerTwo ?? 0),
                3 => (int)(DrawerThree ?? 0),
                4 => (int)(DrawerFour ?? 0),
                5 => (int)(DrawerFive ?? 0),
                _ => throw new NotImplementedException(),
            };
            return(line);
        }
示例#2
0
        public override void UpdateIcbLineStructure(DuraformComponent component, ICBLineStructure line)
        {
            line.SPLIT_PANEL = 1;

            switch (line.TYPE)
            {
            case ICB_TYPE_ENUM.DOOR:
                line.TOOLING_FILE = line.TOOLING_FILE2 = component.DuraformEnquiry.DuraformDesign.ICB_GLASS_TOOLING;
                line.V_SPLIT_Q    = Columns - 1;
                line.H_SPLIT_Q    = Rows - 1;
                break;

            case ICB_TYPE_ENUM.PANTRY:
                throw new NotImplementedException();

            case ICB_TYPE_ENUM.END_PANEL:
                throw new NotImplementedException();

            case ICB_TYPE_ENUM.DRAWER:
                throw new NotImplementedException();

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#3
0
        public override List <ICBLineStructure> ExportIcbLinesStructure()
        {
            var line = new ICBLineStructure(this);

            DuraformOption?.UpdateIcbLineStructure(this, line);

            return(new List <ICBLineStructure> {
                line
            });
        }
示例#4
0
 public override void UpdateIcbLineStructure(DuraformComponent component, ICBLineStructure line)
 {
     switch (component)
     {
         case DuraformDoor door:
             line.TOOLING_FILE = line.TOOLING_FILE2 = ICBLineStructure.NO_FACE_TOOLING;
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
 }
示例#5
0
        public override void UpdateIcbLineStructure(DuraformComponent component, ICBLineStructure line)
        {
            switch (component)
            {
            case DuraformDoor door:
                line.TOOLING_FILE = line.TOOLING_FILE2 = ICBLineStructure.MICROWAVE_TOOLING;
                line.BT           = (int)TopSize;
                line.BB           = (int)BottomSize;
                line.BL           = (int)LeftSize;
                line.BR           = (int)RightSize;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#6
0
        public override List <ICBLineStructure> ExportIcbLinesStructure()
        {
            var line = new ICBLineStructure(this)
            {
                ABB       = ExtraRailBottom.HasValue ? (int)ExtraRailBottom : 0,
                BDH       = (int)ChairRailHeight,
                BDBT      = DuraformEnquiry.DuraformDesign.BB,
                BDH_ADDON = ChairRailType.Name.Equals("Single") ? 0 : DuraformEnquiry.DuraformDesign.BB
            };

            DuraformOption?.UpdateIcbLineStructure(this, line);

            return(new List <ICBLineStructure> {
                line
            });
        }
示例#7
0
        public override void UpdateIcbLineStructure(DuraformComponent component, ICBLineStructure line)
        {
            switch (component)
            {
            case DuraformDrawer drawer:
                throw new NotImplementedException();

            default:
                if (!HasProfile)
                {
                    line.TOOLING_FILE = line.TOOLING_FILE2 = ICBLineStructure.NO_FACE_TOOLING;
                }

                line.MATERIAL = $"RAW{line.DIMZ} MDF";
                break;
            }
        }
示例#8
0
        public override List <ICBLineStructure> ExportIcbLinesStructure()
        {
            var list = new List <ICBLineStructure>();

            switch (DuraformDrawerType.DrawerDesign)
            {
            case DrawerDesign.Single:
                var line = new ICBLineStructure(this)
                {
                    DIMX        = (int)TotalHeight,
                    SLICE_ON    = 1,
                    SLICE_WIDTH = 20,     //TODO remove fixed value
                    DRAWER_NUM  = NumberOfDrawers,
                    DRAWER1     = DrawerOne.HasValue ? (int)DrawerOne.Value : 0,
                    DRAWER2     = DrawerTwo.HasValue ? (int)DrawerTwo.Value : 0,
                    DRAWER3     = DrawerThree.HasValue ? (int)DrawerThree.Value : 0,
                    DRAWER4     = DrawerFour.HasValue ? (int)DrawerFour.Value : 0,
                    DRAWER5     = DrawerFive.HasValue ? (int)DrawerFive.Value : 0,
                    DRAWER6     = 0,
                    DRAWER7     = 0,
                    DRAWER8     = 0,
                    CNCTYPE     = "DRAWER"
                };

                list.Add(line);
                break;

            case DrawerDesign.Individual:
                var index = 1;
                while (index <= NumberOfDrawers)
                {
                    list.Add(ExportIndividualDrawerLine(index));

                    index++;
                }
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            return(list);
        }
示例#9
0
        public override List <ICBLineStructure> ExportIcbLinesStructure()
        {
            var line = new ICBLineStructure(this)
            {
                BL      = (int)RailLeft,
                BR      = (int)RailRight,
                ABB     = ExtraRailBottom.HasValue ? (int)ExtraRailBottom.Value : 0,
                NOPN    = NumberOfShields,
                PANDIV  = NumberOfShields > 1 ? (int)RailCenter : 0,
                CNCTYPE = "IB"
            };

            line.BT += ExtraRailTop.HasValue ? (int)ExtraRailTop.Value : 0;

            DuraformOption?.UpdateIcbLineStructure(this, line);

            return(new List <ICBLineStructure> {
                line
            });
        }
示例#10
0
        public override void UpdateIcbLineStructure(DuraformComponent component, ICBLineStructure line)
        {
            switch (component)
            {
            case DuraformDoor _:
                line.TYPE = ICB_TYPE_ENUM.EXTERNAL_SHAPE;
                line.EXTERNAL_SHAPE_FILE = "ANGLED_SHELF";
                line.TOOLING_FILE        = line.TOOLING_FILE2 = ICBLineStructure.NO_FACE_TOOLING;
                line.USERVAR1            = (int)SideOne;
                line.USERVAR2            = (int)SideTwo;

                if (IsDoubleSided)
                {
                    line.MATERIAL = $"RAW{line.DIMZ} MDF";
                }
                break;

            default:
                throw new NotImplementedException("Not Support Other Types Of Components");
            }
        }
示例#11
0
 public abstract void UpdateIcbLineStructure(DuraformComponent component, ICBLineStructure line);