Ejemplo n.º 1
0
 private void radioButton1_CheckedChanged(object sender, EventArgs e)
 {
     if (this.InvokeRequired)
     {
         ListOfReadyPlayer.Invoke((MethodInvoker)(() => ListOfReadyPlayer.Items.Clear()));
     }
     else
     {
         ListOfReadyPlayer.Items.Clear();
     }
     client.SendQAForWait();
 }
Ejemplo n.º 2
0
        public void ChandeForm2(List <string> list)
        {
            //    if (this.InvokeRequired)
            //    {
            //        ListOfPlayers.Invoke((MethodInvoker)(() => ListOfPlayers.Items.Clear()));
            //    }
            //    else
            //    {
            //        ListOfPlayers.Items.Clear();
            //    }

            // ListOfReadyPlayer.Items.Clear();
            foreach (string player in list)
            {
                bool fla = false;
                ListOfReadyPlayer.Invoke((MethodInvoker)(() => fla = ListOfReadyPlayer.Items.Contains(player)));

                if (player != name && fla == false)
                {
                    ListOfReadyPlayer.Invoke((MethodInvoker)(() => ListOfReadyPlayer.Items.Add(player)));
                }
            }
        }
Ejemplo n.º 3
0
 private void StartGameBUT_Click(object sender, EventArgs e)
 {
     if (this.InvokeRequired)
     {
         StartGameBUT.Invoke((MethodInvoker)(() => StartGameBUT.Dispose()));
         SettingsBUT.Invoke((MethodInvoker)(() => SettingsBUT.Dispose()));
         EscapeBUT.Invoke((MethodInvoker)(() => EscapeBUT.Dispose()));
         Title.Invoke((MethodInvoker)(() => Title.Visible = true));
         ListOfPlayers.Invoke((MethodInvoker)(() => ListOfReadyPlayer.Visible = true));
         ListOfReadyPlayer.Invoke((MethodInvoker)(() => ListOfPlayers.Visible = true));
         Status.Invoke((MethodInvoker)(() => Status.Visible = true));
         groupChoose.Invoke((MethodInvoker)(() => groupChoose.Visible = true));
         ChooseEnemyBUT.Invoke((MethodInvoker)(() => ChooseEnemyBUT.Visible = true));
         RandomEnemyBUT.Invoke((MethodInvoker)(() => RandomEnemyBUT.Visible = true));
         this.Width = 622;
     }
     else
     {
         StartGameBUT.Dispose();
         SettingsBUT.Dispose();
         EscapeBUT.Dispose(); Title.Visible = true; ListOfReadyPlayer.Visible = true; ListOfPlayers.Visible = true;
         Status.Visible = true; groupChoose.Visible = true; ChooseEnemyBUT.Visible = true; RandomEnemyBUT.Visible = true; this.Width = 622;
     }
 }