Exemplo n.º 1
0
 private void CreateNewGame(int maxPlayers, int idGame, int colorPlayer)
 {
     Dispatcher.Invoke(new ThreadStart(() =>
     {
         RandWind randWind = this;
         MainWindow main   = new MainWindow(maxPlayers, idGame, colorPlayer, soket, randWind);
         main.ShowDialog();
         PlayOrExit = false;
         Disconnected(soket);
     }));
 }
Exemplo n.º 2
0
        public MainWindow(int maxPlayers, int idGame, int colorPlayer, Socket soket, RandWind randWind)
        {
            this.idGame      = idGame;
            this.colorPlayer = colorPlayer;
            this.soket       = soket;
            this.randWind    = randWind;
            this.randWind.Hide();
            maxValPlayers = maxPlayers;

            scoresPlayers = new Label[maxValPlayers];

            InitializeComponent();
        }