查找类型为Panel的控件
var control = from tempcontrol in this.ActiveMdiChild.Controls.OfType<Panel>().AsQueryable() where tempcontrol.Name == "panel1" select tempcontrol;
var control1 = from tempcontrol1 in control.ElementAt<Panel>(0).Controls.OfType<GroupBox>().AsQueryable() where tempcontrol1.Name == "groupBox1" select tempcontrol1;
var control2 = from tempcontrol2 in control1.ElementAt<GroupBox>(0).Controls.OfType<TextBox>().AsQueryable() where tempcontrol2.Name == "fileNameTextBox" select tempcontrol2;
给控件设置值
control2.ElementAt<TextBox>(0).Text = openFileDialog.FileName;