Exemplo n.º 1
0
        private void question5()
        {
            delete_btn.Visible = false;
            Update_btn.Visible = false;
            Edit_btn.Visible = false;
            comboBox1.Visible = true;
            label1.Text = "Choose Player:";
            label1.Visible = true;

            allPlayers = server.getAllPlayers();
            comboBox1.Items.Clear();
            foreach (var item in allPlayers)
            {
                comboBox1.Items.Add(item.playerId + " || " + item.firstName);
            }
            delete_btn.Enabled = false;
            Update_btn.Enabled = false;
            Edit_btn.Enabled = false;
            q5 = new Q3(server, 1);
            this.ClientSize = new System.Drawing.Size(400, 400);
            elementHost.Location = new System.Drawing.Point(5, 70);
            elementHost.Name = "elementHost";
            elementHost.Size = new System.Drawing.Size(395, 300);
            elementHost.TabIndex = 2;
            elementHost.Text = "elementHost";
            elementHost.Child = q5;
            Controls.Add(this.elementHost);
        }
Exemplo n.º 2
0
        //load the player list from server
        private void loadPlayerList()
        {
            avilablePlayers = server.getAviableOnlinePlayers(playerId);
            comboBox.Items.Clear();
            comboBox.Items.Add(0 + " || Play Against PC");
            comboBox.SelectedIndex = 0;
            foreach (var item in avilablePlayers)
            {
                comboBox.Items.Add(item.playerId + " || " + item.firstName);
            }
            easy_btn.Checked = true;

        }