예제 #1
0
        public static FrameSection Factory(string uniqueName)
        {
            if (Registry.FrameSections.Keys.Contains(uniqueName))
            {
                return(Registry.FrameSections[uniqueName]);
            }

            eFrameSectionType frameSectionType = GetType(uniqueName);
            FrameSection      frameSection     = null;

            switch (frameSectionType)
            {
            case eFrameSectionType.Rectangular:
            case eFrameSectionType.BucklingRestrainedBrace:
                frameSection = RectangleSection.Factory(uniqueName);
                break;

            default:
                return(null);
            }

            if (_frameSection != null)
            {
                frameSection.GetFrameType();
                frameSection.GetSectionProperties();
            }
            Registry.FrameSections.Add(uniqueName, frameSection);
            return(frameSection);
        }
        public static RectangleSection Factory(
            string uniqueName,
            eFrameSectionType frameType,
            double t3,
            double t2,
            double tf,
            double tw,
            double t2b,
            double tfb,
            CSiApplication app = null)
        {
            if (Registry.FrameSections.Keys.Contains(uniqueName))
            {
                return((RectangleSection)Registry.FrameSections[uniqueName]);
            }

            RectangleSection frameSection = (RectangleSection)FrameSection.Factory(uniqueName, t3, t2, tf, tw, t2b, tfb);

            if (app != null)
            {
                frameSection.GetRectangle(app);
            }
            Registry.FrameSections.Add(uniqueName, frameSection);
            return(frameSection);
        }
        public static RectangleSection Factory(
            string uniqueName,
            CSiApplication app = null)
        {
            if (Registry.FrameSections.Keys.Contains(uniqueName))
            {
                return((RectangleSection)Registry.FrameSections[uniqueName]);
            }

            RectangleSection frameSection = (RectangleSection)FrameSection.Factory(uniqueName);

            if (app != null)
            {
                frameSection.GetRectangle(app);
            }
            Registry.FrameSections.Add(uniqueName, frameSection);
            return(frameSection);
        }