private void Button_Click_1(object sender, RoutedEventArgs e) { ClientJoin ClientJoin = new ClientJoin(); ClientJoin.Show(); this.Close(); }
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(); }