/// <summary>
        /// The main method which create the corresponding FrameReinMaker according to
        /// the host object type, and invoke Run() method to create reinforcement rebars
        /// </summary>
        /// <returns>true if the creation is successful, otherwise false</returns>
        public bool work()
        {
            // define an IFrameReinMaker interface to create reinforcement rebars
            IFrameReinMaker maker = null;

            // create FrameReinMaker instance according to host object type
            switch (m_hostObject.StructuralType)
            {
            case StructuralType.Beam:       // if host object is a beam
                maker = new BeamFramReinMaker(m_commandData, m_hostObject);
                break;

            case StructuralType.Column:     // if host object is a column
                maker = new ColumnFramReinMaker(m_commandData, m_hostObject);
                break;

            default:
                break;
            }

            // invoke Run() method to do the reinforcement creation
            maker.Run();

            return(true);
        }
Esempio n. 2
0
        /// <summary>
        /// constructor for ColumnFramReinMakerForm
        /// </summary>
        /// <param name="dataBuffer">the ColumnFramReinMaker reference</param>
        public ColumnFramReinMakerForm(ColumnFramReinMaker dataBuffer)
        {
            // Required for Windows Form Designer support
            InitializeComponent();

            // Store the reference of ColumnFramReinMaker
            m_dataBuffer = dataBuffer;

            // Bing the data source for all combo boxes
            BingingDataSource();

            // set the initializtion data of the spacing
            centerSpacingTextBox.Text = 0.1.ToString("0.0");
            endSpacingTextBox.Text    = 0.1.ToString("0.0");
        }