Exemple #1
0
        private void Update_Layer_Sections()
        {
            Reinforcement_Layout_Section sec = new Reinforcement_Layout_Section();
            Reinforcement_Layout         lay = null;

            for (int i = 0; i < dgv_layout_sections.Rows.Count; i++)
            {
                lay = new Reinforcement_Layout(i + 1);

                lay.Number_Strips  = MyList.StringToInt(dgv_layout_sections[1, i].Value.ToString(), -1);
                lay.Strip_Type     = MyList.StringToInt(dgv_layout_sections[2, i].Value.ToString(), -1);
                lay.Strip_Strength = MyList.StringToDouble(dgv_layout_sections[3, i].Value.ToString(), 0.0);
                lay.Strip_Length   = MyList.StringToDouble(dgv_layout_sections[4, i].Value.ToString(), 0.0);
                lay.z       = MyList.StringToDouble(dgv_layout_sections[5, i].Value.ToString(), 0.0);
                lay.delta_h = MyList.StringToDouble(dgv_layout_sections[6, i].Value.ToString(), 0.0);
                lay.fn      = MyList.StringToDouble(dgv_layout_sections[7, i].Value.ToString(), 0.0);
                sec.Layers.Add(lay);
            }
            re_des.Layout_Sections[cmb_section_height.SelectedIndex] = sec;
        }
Exemple #2
0
        private void btn_chng_layout_Click(object sender, EventArgs e)
        {
            Reinforcement_Layout_Section sec = new Reinforcement_Layout_Section();
            Reinforcement_Layout         lay = null;

            for (int i = 0; i < dgv_layout_sections.Rows.Count; i++)
            {
                lay = new Reinforcement_Layout(i + 1);

                lay.Number_Strips  = MyList.StringToInt(dgv_layout_sections[1, i].Value.ToString(), -1);
                lay.Strip_Type     = MyList.StringToInt(dgv_layout_sections[2, i].Value.ToString(), -1);
                lay.Strip_Strength = MyList.StringToDouble(dgv_layout_sections[3, i].Value.ToString(), 0.0);
                lay.Strip_Length   = MyList.StringToDouble(dgv_layout_sections[4, i].Value.ToString(), 0.0);
                lay.z       = MyList.StringToDouble(dgv_layout_sections[5, i].Value.ToString(), 0.0);
                lay.delta_h = MyList.StringToDouble(dgv_layout_sections[6, i].Value.ToString(), 0.0);
                lay.fn      = MyList.StringToDouble(dgv_layout_sections[7, i].Value.ToString(), 0.0);
                sec.Layers.Add(lay);
            }
            re_des.Layout_Sections[cmb_section_height.SelectedIndex] = sec;

            MessageBox.Show("Data modified.", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }