Ejemplo n.º 1
0
        private void newChallengeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (NewRaceForm challengeForm = new NewRaceForm())
            {
                challengeForm.ShowDialog();

                if (challengeForm.SelectedCircuit != null)
                {
                    string packetContent = "";

                    if (challengeForm.Mirror)
                    {
                        packetContent = challengeForm.SelectedCircuit.MirrorBlockNumber + "|" + challengeForm.SelectedCircuit.MirrorNumber;
                    }
                    else
                    {
                        packetContent = challengeForm.SelectedCircuit.BlockNumber + "|" + challengeForm.SelectedCircuit.Number;
                    }

                    gameServer.SendAll(new Packet()
                    {
                        PacketType = PacketType.Race,
                        Content    = packetContent
                    });
                }
            }
        }
Ejemplo n.º 2
0
        private void newChallengeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (NewRaceForm challengeForm = new NewRaceForm())
            {
                challengeForm.ShowDialog();

                if (challengeForm.SelectedCircuit != null)
                {
                    string packetContent = "";

                    if (challengeForm.Mirror)
                    {
                        packetContent = challengeForm.SelectedCircuit.MirrorBlockNumber + "|" + challengeForm.SelectedCircuit.MirrorNumber;
                    }
                    else
                    {
                        packetContent = challengeForm.SelectedCircuit.BlockNumber + "|" + challengeForm.SelectedCircuit.Number;
                    }

                    gameServer.SendAll(new Packet()
                        {
                            PacketType = PacketType.Race,
                            Content = packetContent
                        });
                }
            }
        }