///
/// 检测窗口是否开启
///
/// 要检测的窗口类名
///
private bool CheckFormIsOpen(string sFromClassName)
{
foreach (Form childrenForm in this.MdiChildren)
{
//检测是不是当前子窗体名称
if (childrenForm.Name == sFromClassName)
{
//是的话就是把他显示
childrenForm.Visible = true;
//并激活该窗体
childrenForm.Activate();
return true;
}
}
return false;
}