Пример #1
0
 private void CreateGameButton_Click(object sender, EventArgs e)
 {
     hostGameMenu = new HostGameMenuControl();
     MainPanel.SuspendLayout();
     MainPanel.Controls.Clear();
     MainPanel.Controls.Add(hostGameMenu);
     MainPanel.ResumeLayout(false);
     //updatePlayerList(1, "zirrobin");
     communicator.IsHost        = true;
     communicator.ActiveControl = hostGameMenu;
     communicator.StartListening();
     hostGameMenu.AddLobbyPlayer(1, "Host");
     hostGameMenu.EnterHostSettings();
 }
Пример #2
0
        private void JoinButton_Click(object sender, EventArgs e)
        {
            //communicator.connectToHost();
            communicator.Connect();
            hostGameMenu = new HostGameMenuControl();
            MainPanel.SuspendLayout();
            MainPanel.Controls.Clear();
            MainPanel.Controls.Add(hostGameMenu);
            MainPanel.ResumeLayout(false);
            //updatePlayerList(1, "zirrobin");
            communicator.StartListening();
            communicator.ActiveControl = hostGameMenu;
            hostGameMenu.AddLobbyPlayer(2, "Client");

            //JoinGameMenuControl joinGameMenu = new JoinGameMenuControl();
            //MainPanel.SuspendLayout();
            //MainPanel.Controls.Clear();
            //MainPanel.Controls.Add(joinGameMenu);
            //MainPanel.ResumeLayout(false);
        }