public static MdiChildFoRunGame GetForm() { if (_frmForRunGame == null) { _frmForRunGame = new MdiChildFoRunGame(); } return(_frmForRunGame); }
private void runGameRToolStripMenuItem_Click(object sender, EventArgs e) { MdiChildFoRunGame frmChidChildForRunGame = MdiChildFoRunGame.GetForm(); frmChidChildForRunGame.MdiParent = this; frmChidChildForRunGame.WindowState = FormWindowState.Maximized; frmChidChildForRunGame.Show(); }
private void Dispose() { Console.WriteLine("Form For Run Game Dispose!"); Dispose(true); _frmForRunGame = null; }
private void MdiChildFoRunGame_FormClosing(Object sender, FormClosingEventArgs e) { _frmForRunGame.Close(); _frmForRunGame = null; }