单例模式创建窗口
Parent.cs:
Child child = Child.ChildSignleton(); child.MdiParent = this; child.Show();
Child.cs:
public static Child childform = null; public static Child ChildSignleton() { if (childform == null) { childform = new Child(); } return childform; } private void Child_FormClosing(object sender, FormClosingEventArgs e) { try { this.Dispose(true); childform = null; } catch (Exception m) { MessageBox.Show(m.ToString()); } }
把圈子变小,把语言变干净,把成绩往上提,把故事往心里收,现在想要的以后你都会有。

浙公网安备 33010602011771号