#region findControls 递归遍历 清空窗体Text ComboBox 等的内容
/// <summary>
/// 递归遍历 清空窗体Text ComboBox 等的内容
/// </summary>
public void findControls()
{
foreach (Control c in this.panel1.Controls)
{
string cType = c.GetType().Name;
switch (cType)
{
case "TextBox":
((TextBox)c).Text = "";
break;
case "ComboBox":
((ComboBox)c).Text = "";
break;
}
if (c.Controls.Count > 0)
{
findControls();
}
}
}
#endregion