/// <summary>
/// 显示form
/// </summary>
/// <param name="form">要显示的form</param>
/// <param name="canClose">是否将其他form关闭</param>
private void ShowForm(Form form, bool canClose)
{
foreach (Form mdiChild in MdiChildren)
{
bool b = mdiChild.GetType() == form.GetType();
if (b)
{
form.Close();
mdiChild.Focus();
return;
}
if (canClose)
{
mdiChild.Close();
}
}
form.MdiParent = this;
form.ControlBox = false;
form.WindowState = FormWindowState.Maximized;
form.Show();
}