/// <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); }
/// <summary> /// constructor /// </summary> /// <param name="dataBuffer">the BeamFramReinMaker reference</param> public BeamFramReinMakerForm(BeamFramReinMaker dataBuffer) { // Required for Windows Form Designer support InitializeComponent(); // Store the reference of BeamFramReinMaker m_dataBuffer = dataBuffer; // Bing the data source for all combo boxes BingingDataSource(); // set the initialization data of the spacing transverseCenterSpacingTextBox.Text = 0.1.ToString("0.0"); transverseEndSpacingTextBox.Text = 0.1.ToString("0.0"); }