コード例 #1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            ClientJoin ClientJoin = new ClientJoin();

            ClientJoin.Show();
            this.Close();
        }
コード例 #2
0
        private void Listening_Click(object sender, RoutedEventArgs e)
        {
            // Start Server
            string IP = HostIP.Text;

            playerNum = int.Parse(gameNumBox.Text);
            Thread thread = new Thread(delegate()
            {
                doServer(IP, this.playerNum);
            });

            thread.Start();

            // Start Client
            ClientJoin cJoin = new ClientJoin();

            cJoin.Show();
            cJoin.textIP.Text   = IP;
            cJoin.textName.Text = this.gameID.Text;
            ButtonAutomationPeer peer       = new ButtonAutomationPeer(cJoin.btnConnect);
            IInvokeProvider      invokeProv = peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;

            invokeProv.Invoke();
            this.Close();
        }
コード例 #3
0
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     ClientJoin ClientJoin = new ClientJoin();
     ClientJoin.Show();
     this.Close();
 }
コード例 #4
0
        private void Listening_Click(object sender, RoutedEventArgs e)
        {
            // Start Server
            string IP = HostIP.Text;
            playerNum = int.Parse(gameNumBox.Text);
            Thread thread = new Thread(delegate()
            {
                doServer(IP, this.playerNum);
            });
            thread.Start();

            // Start Client
            ClientJoin cJoin = new ClientJoin();
            cJoin.Show();
            cJoin.textIP.Text = IP;
            cJoin.textName.Text = this.gameID.Text;
            ButtonAutomationPeer peer = new ButtonAutomationPeer(cJoin.btnConnect);
            IInvokeProvider invokeProv = peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
            invokeProv.Invoke();
            this.Close();
        }