日期:2014-05-17 浏览次数:20891 次
//show MDIchild
public void ShowChild(string childFullName)
{
if (!IsExist(childFullName))
{
Type type = Type.GetType(childFullName);
if (type != null)
{
object obj = Activator.CreateInstance(type);
Form child = (Form)obj;
child.MdiParent = this;
child.Dock = DockStyle.Fill;
child.Show();
childFormList.Add(child);
}
}
else
{
Form existForm = childFormList.Find(form => (form.GetType().ToString() == childFullName));
existForm.Activate();
}
}
// if child has been created
public bool IsExist(string childFullName)
{
foreach (Form f in childFormList)
&nbs