コード例 #1
0
        //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);
        }
コード例 #2
0
        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);
        }