Example #1
0
        private void Reload_Seccion()
        {
            CRefuerzo refuerzo;
            DataGridViewComboBoxCell boxCell;
            string diametro;
            int    id, indice;
            double x, y;

            double[] coord;
            Seccion.Refuerzos.Clear();

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                boxCell  = (DataGridViewComboBoxCell)dataGridView1.Rows[i].Cells[1];
                id       = Convert.ToInt32(dataGridView1.Rows[i].Cells[0].Value);
                diametro = boxCell.Value.ToString();
                x        = Convert.ToDouble(dataGridView1.Rows[i].Cells[2].Value);
                y        = Convert.ToDouble(dataGridView1.Rows[i].Cells[3].Value);
                coord    = new double[] { x, y };

                refuerzo = new CRefuerzo(id, diametro, coord, TipodeRefuerzo.longitudinal);
                Seccion.Refuerzos.Add(refuerzo);
            }

            Seccion.Acero_Long = Seccion.Refuerzos.Sum(x1 => x1.As_Long);
            Seccion.Editado    = true;

            if (gde == GDE.DES)
            {
                indice = Form1.secciones_predef.Secciones_DES.FindIndex(x1 => x1.ToString() == Seccion.ToString());
                Form1.secciones_predef.Secciones_DES[indice] = Seccion;
            }
            else
            {
                indice = Form1.secciones_predef.Secciones_DMO.FindIndex(x1 => x1.ToString() == Seccion.ToString());
                Form1.secciones_predef.Secciones_DMO[indice] = Seccion;
            }
        }
Example #2
0
        private void Reload_Seccion()
        {
            CRefuerzo refuerzo;
            string    diametro;
            int       Alzado = 0;
            double    x, y;

            double[] coord;
            int      indice = 0;

            diametro = cbDiametros.Text;
            Alzado   = Convert.ToInt32(tbAlzado.Text);
            x        = Convert.ToDouble(tbXc.Text);
            y        = Convert.ToDouble(tbYc.Text);
            coord    = new double[] { x, y };

            refuerzo                 = new CRefuerzo(Seccion.Refuerzos[index].id, diametro, coord, TipodeRefuerzo.longitudinal);
            refuerzo.Alzado          = Alzado;
            Seccion.Refuerzos[index] = FunctionsProject.DeepClone(refuerzo);
            Seccion.Editado          = true;

            if (FInterfaz_.edicion == Tipo_Edicion.Secciones_modelo)
            {
                indice = Form1.Proyecto_.ColumnaSelect.Seccions.FindIndex(x1 => x1.Item2 == piso);
                Form1.Proyecto_.ColumnaSelect.Seccions[indice] = new Tuple <ISeccion, string>(Seccion, piso);
            }

            if (FInterfaz_.edicion == Tipo_Edicion.Secciones_predef & GDE == GDE.DMO)
            {
                indice = Form1.secciones_predef.Secciones_DMO.FindIndex(x1 => x1.ToString() == Seccion.ToString());
                Form1.secciones_predef.Secciones_DMO[indice] = Seccion;
            }

            if (FInterfaz_.edicion == Tipo_Edicion.Secciones_predef & GDE == GDE.DES)
            {
                indice = Form1.secciones_predef.Secciones_DES.FindIndex(x1 => x1.ToString() == Seccion.ToString());
                Form1.secciones_predef.Secciones_DES[indice] = Seccion;
            }
        }
 public override string ToString()
 {
     return($"{Nombre} |NoLineas= {Lista_Lineas.Count}| {Seccion.ToString()}");
 }
Example #4
0
 public override string ToString()
 {
     return($"{Nombre} | {Seccion.ToString()}");
 }