1 private void FormLugOther_Load(object sender, EventArgs e) 2 { 3 foreach (string str in FormLug.FieldListLug1) 4 { 5 try 6 { 7 Label label = new Label(); 8 label.Text = str; 9 this.tableLayoutPanel1.Controls.Add(label); 10 TextBox textbox = new TextBox(); 11 textbox.Name = "tb" + str; 12 textbox.Text = FormLug.tbValue.Rows[0][str].ToString(); 13 this.tableLayoutPanel1.Controls.Add(textbox); 14 } 15 catch 16 { 17 return; 18 } 19 } 20 }
时间: 2024-11-03 21:57:37