Esempio n. 1
0
        protected Design(Design prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            if (prototype.m_layoutComponent != null)
            {
                m_layoutComponent = (LayoutComponent)prototype.m_layoutComponent.Clone();
            }

            m_parameters = prototype.m_parameters.Clone();
        }
Esempio n. 2
0
        public static Design CreateEmptyDesign()
        {
            var fabricStyles = new FabricStyleList();

            var design = new Design()
            {
                Width  = new Dimension(48, DimensionUnits.Inch),
                Height = new Dimension(48, DimensionUnits.Inch)
            };

            var component = LayoutComponent.Create("Standard", "Quilt Layout", fabricStyles, 3, 3, 2);

            design.LayoutComponent = component;

            return(design);
        }
Esempio n. 3
0
        public Node Expand(Design design)
        {
            var node = design.LayoutComponent.Expand(true);

            if (BorderWidth.Value == 0)
            {
                return(node);
            }
            else
            {
                var borderLayoutNode = new BorderLayoutNode(BorderFabricStyle, BorderWidth);
                borderLayoutNode.LayoutSites[0].Node = node;

                return(borderLayoutNode);
            }
        }
Esempio n. 4
0
        public Kit(JToken json)
        {
            if (json == null)
            {
                throw new ArgumentNullException(nameof(json));
            }

            var jsonDesign = json[JsonNames.Design];

            if (jsonDesign != null)
            {
                m_design = new Design(jsonDesign);
            }

            var jsonKitSpecification = json[JsonNames.KitSpecification];

            if (jsonKitSpecification != null)
            {
                m_kitSpecification = new KitSpecification(jsonKitSpecification);
            }
        }
Esempio n. 5
0
        private KitPartList m_parts; // derived -- see RefreshOuputs

        public Kit(Design design, KitSpecification kitSpecification)
        {
            m_design           = design ?? throw new ArgumentNullException(nameof(design));
            m_kitSpecification = kitSpecification ?? throw new ArgumentNullException(nameof(kitSpecification));
        }