Пример #1
0
        public IEnumerable <PortalViewPort> DivideByLayout(StandardPlacementLayouts layout)
        {
            var lpvp = new List <PortalViewPort>();

            foreach (var svp in StandardPlacementLayoutSpecification.DescribeLayout(layout))
            {
                lpvp.Add(this.NestViewPort(svp));
            }

            return(lpvp);
        }
Пример #2
0
        public static IEnumerable <StandardViewPorts> DescribeLayout(StandardPlacementLayouts layout)
        {
            switch (layout)
            {
            case StandardPlacementLayouts.Full:
                return(EnumerableEx.OfOne(StandardViewPorts.Full));

            case StandardPlacementLayouts.HorizontalThirds:
                return(EnumerableEx.OfThree(StandardViewPorts.LeftThird, StandardViewPorts.MiddleThirdVertical, StandardViewPorts.RightThird));

            case StandardPlacementLayouts.HorizontalHalves:
                return(EnumerableEx.OfTwo(StandardViewPorts.LeftHalf, StandardViewPorts.RightHalf));

            case StandardPlacementLayouts.HorizontalSideBurns:
                return(EnumerableEx.OfThree(StandardViewPorts.LeftFourth, StandardViewPorts.MiddleHalfVertical, StandardViewPorts.RightFourth));

            case StandardPlacementLayouts.Horizontal1_2:
                return(EnumerableEx.OfTwo(StandardViewPorts.LeftThird, StandardViewPorts.RightTwoThirds));

            case StandardPlacementLayouts.Horizontal2_1:
                return(EnumerableEx.OfTwo(StandardViewPorts.LeftTwoThirds, StandardViewPorts.RightThird));

            case StandardPlacementLayouts.VerticalThirds:
                return(EnumerableEx.OfThree(StandardViewPorts.TopThird, StandardViewPorts.MiddleThirdHorizontal, StandardViewPorts.BottomThird));

            case StandardPlacementLayouts.VerticalHalves:
                return(EnumerableEx.OfTwo(StandardViewPorts.TopHalf, StandardViewPorts.BottomHalf));

            case StandardPlacementLayouts.VerticalSandwich:
                return(EnumerableEx.OfThree(StandardViewPorts.TopFourth, StandardViewPorts.MiddleHalfHorizontal, StandardViewPorts.BottomFourth));

            case StandardPlacementLayouts.Vertical1_2:
                return(EnumerableEx.OfTwo(StandardViewPorts.TopThird, StandardViewPorts.BottomTwoThirds));

            case StandardPlacementLayouts.Vertical2_1:
                return(EnumerableEx.OfTwo(StandardViewPorts.TopTwoThirds, StandardViewPorts.BottomThird));

            case StandardPlacementLayouts.PantsLeft:
                return(EnumerableEx.OfThree(StandardViewPorts.LeftThird, StandardViewPorts.PantLegTR2L, StandardViewPorts.PantLegBR2L));

            case StandardPlacementLayouts.PantsRight:
                return(EnumerableEx.OfThree(StandardViewPorts.RightThird, StandardViewPorts.PantLegTL2R, StandardViewPorts.PantLegBL2R));

            case StandardPlacementLayouts.PantsStand:
                return(EnumerableEx.OfThree(StandardViewPorts.TopThird, StandardViewPorts.PantLegL2Up, StandardViewPorts.PantLegR2Up));

            case StandardPlacementLayouts.PantsHandstand:
                return(EnumerableEx.OfThree(StandardViewPorts.BottomThird, StandardViewPorts.PantLegL2Dn, StandardViewPorts.PantLegR2Dn));
            }

            return(Enumerable.Empty <StandardViewPorts>());
        }