33
社区成员




namespace 单例
{
public partial class ZhuForm : Form
{
public ZhuForm()
{ InitializeComponent(); }
public static ZhuForm tank0
{
get { if (tank0 == null) tank0 = new ZhuForm(); }
return tank0 ;
}
public void LoadChildPage(Form form) // 每次加载子窗口的时候关闭其他窗口
{
foreach (var item in tank.MdiChildren) item.Close();
form.Show();
}
static ZhuForm tank;
}
tank0 = new ZhuForm(); 改为 tank= new ZhuForm();