Beispiel #1
0
        //加载tab1_View
        private void LoadTab1View()
        {
            if (_tab1List == null)
            {
                _tab1List = new List <GouZaoParam>();
            }
            ComputeClass compute = new ComputeClass();

            for (int i = 0; i < this.rowMergaView1.Rows.Count; i++)
            {
                for (int k = 2; k < this.rowMergaView1.Columns.Count; k++)
                {
                    string ctype = this.rowMergaView1.Columns[k].Name;
                    if (ctype == ">=60")
                    {
                        ctype = "C60";
                    }
                    string gtype = this.rowMergaView1.Rows[i].Cells[0].Value.ToString();
                    string level = this.rowMergaView1.Rows[i].Cells[1].Value.ToString();
                    if (gtype.IndexOf("\n") != -1)
                    {
                        gtype = gtype.Replace("\n", ",");
                    }
                    double vals = compute.anchoragelength(ctype, gtype);
                    this.rowMergaView1.Rows[i].Cells[k].Value = _tab1List.Find(x => x.x == k && x.y == i).Value;
                }
            }
        }
Beispiel #2
0
        //生成tab2_View
        private void CreateTab2View()
        {
            ComputeClass compute = new ComputeClass();

            for (int k = 1; k < this.dataGridView1.Columns.Count; k++)
            {
                for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
                {
                    double c = 0;
                    if (k == 1)
                    {
                        c = Convert.ToDouble(this.dataGridView1.Rows[i].Cells[0].Value);
                        c = compute.AbeliteSet(c);
                        this.dataGridView1.Rows[i].Cells[k].Value = c;
                    }
                    if (k == 2 || k == 3)
                    {
                        this.dataGridView1.Rows[i].Cells[k].Value = "10d";
                    }
                    if (k == 4)
                    {
                        this.dataGridView1.Rows[i].Cells[k].Value = "0.35d";
                    }
                    if (k == 5)
                    {
                        this.dataGridView1.Rows[i].Cells[k].Value = "0.50d";
                    }
                    if (k == 6)
                    {
                        this.dataGridView1.Rows[i].Cells[k].Value = "0.85d";
                    }
                    if (k == 7)
                    {
                        this.dataGridView1.Rows[i].Cells[k].Value = "2d";
                    }
                    if (k == 8)
                    {
                        this.dataGridView1.Rows[i].Cells[k].Value = "2.5d";
                    }
                    if (k == 9)
                    {
                        this.dataGridView1.Rows[i].Cells[k].Value = "3.5d";
                    }

                    //_Bims.Add(new T2Values2
                    //{
                    //    CValue = this.dataGridView1.Columns[k].Name,
                    //    RValue = Convert.ToDouble(this.dataGridView1.Rows[i].Cells[0].Value),
                    //    Value = c,
                    //    X=1,
                    //    Y=i
                    //}) ;
                }
            }
        }
Beispiel #3
0
        //生成tab1_View
        private void CreateTab1View()
        {
            if (_tab1List == null)
            {
                _tab1List = new List <GouZaoParam>();
            }
            ComputeClass compute = new ComputeClass();

            for (int i = 0; i < this.rowMergaView1.Rows.Count; i++)
            {
                for (int k = 2; k < this.rowMergaView1.Columns.Count; k++)
                {
                    string ctype = this.rowMergaView1.Columns[k].Name;
                    if (ctype == ">=60")
                    {
                        ctype = "C60";
                    }
                    string gtype = this.rowMergaView1.Rows[i].Cells[0].Value.ToString();
                    string level = this.rowMergaView1.Rows[i].Cells[1].Value.ToString();
                    if (gtype.IndexOf("\n") != -1)
                    {
                        gtype = gtype.Replace("\n", ",");
                    }
                    double vals = compute.anchoragelength(ctype, gtype);
                    this.rowMergaView1.Rows[i].Cells[k].Value = $"{vals}d";
                    _tab1List.Add(new GouZaoParam
                    {
                        Concrete = ctype,
                        Rebars   = gtype,
                        Value    = vals,
                        Level    = (Levels)Enum.Parse(typeof(Levels), level),
                        x        = k,
                        y        = i
                    });;
                }
            }
        }
Beispiel #4
0
        private void GetWaist_Bar()
        {
            _waistList = new List <Waist>();
            ComputeClass compute = new ComputeClass();
            int          n = 0; double d = 0d;
            int          b = 0, h = 0;

            for (int i = 0; i < dataGrid_Side.Columns.Count; i++)
            {
                for (int k = 0; k < dataGrid_Side.Rows.Count; k++)
                {
                    h = int.Parse(dataGrid_Side.Columns[i].Name);
                    b = ((dataGrid_Side.Rows[k].Index * 50) + StartIndex);
                    compute.waist(b, h, ref n, ref d);
                    _waistList.Add(new Waist
                    {
                        Hw    = h,
                        B     = b,
                        Value = $"{n}φ{d}"
                    });
                }
            }
            PushWaist();
        }