//Hide form and start tetris public void onTetrisRun(Random ownRandom, Random otherRandom) { clientForm.Hide(); var form = new TetrisForm(); TetrisClient attachedClient = (!mpButton.Checked) ? this : null; currentEngine = new TetrisEngine(form, !mpButton.Checked, attachedClient, ownRandom, otherRandom); }
public void disconnectClient() { string caption = "Disconnected. We're sorry :("; MessageBoxButtons buttons = MessageBoxButtons.OK; stopConnection(); currentEngine.tetrisForm.Hide(); currentEngine.stopTimer(); currentEngine = null; clientForm.Show(); MessageBox.Show("", caption, buttons); }