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(); }
private void Button_Click_1(object sender, RoutedEventArgs e) { ClientJoin ClientJoin = new ClientJoin(); ClientJoin.Show(); this.Close(); }
public DataItem(string p_name, Player p) { Column1 = p_name; Column2 = p.handcard.Count.ToString(); Dictionary <string, int> pDic = ClientJoin.CalculateCard(p.showedcardlist); Column3 = pDic["cocktail"].ToString(); Column4 = pDic["rat"].ToString(); Column5 = pDic["scorpion"].ToString(); Column6 = pDic["fly"].ToString(); Column7 = pDic["toad"].ToString(); Column8 = pDic["spider"].ToString(); Column9 = pDic["bat"].ToString(); Column10 = pDic["bug"].ToString(); }
public ClientPage(ClientJoin c1) { this.c = c1; InitializeComponent(); }