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
        //生成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
                    });;
                }
            }
        }