///<summary>
///清空所有的文本框
///</summary>
privatevoidClearAllTextBox()
{
foreach(Controlcontrolinthis.groupBox1.Controls)
{
if(controlisTextBox)
{
((TextBox)control).Text="";
}
}
}
if(control.GetType().ToString()=="System.Windows.Forms.TextBox")
privatevoidClearTextBoxAndComboBoxAndCheckBox()
{
foreach(Controlcinthis.Controls)
{
if(c.GetType().ToString().Contains("TextBox"))
{
((TextBox)c).Text="";
}
if(c.GetType().ToString().Contains("ComboBox"))
{
((ComboBox)c).Text="";
}
if(c.GetType().ToString().Contains("CheckBox"))
{
((CheckBox)c).Checked=false;
}
}
}
285

被折叠的 条评论
为什么被折叠?



