public GameRoom(string ticket) { InitializeComponent(); this.txtGroup = new System.Windows.Forms.TextBox[9]; for (int i = 0; i < this.txtGroup.Length; i++) { this.txtGroup[i] = new System.Windows.Forms.TextBox(); this.txtGroup[i].BackColor = System.Drawing.Color.Khaki; this.txtGroup[i].BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtGroup[i].Cursor = System.Windows.Forms.Cursors.Default; this.txtGroup[i].Location = new System.Drawing.Point(0, 0 + i * 25); this.txtGroup[i].Name = "txtGroup[" + i.ToString() + "]"; this.txtGroup[i].ReadOnly = true; this.txtGroup[i].Size = new System.Drawing.Size(107, 20); this.txtGroup[i].TabIndex = 0; this.txtGroup[i].TextAlign = System.Windows.Forms.HorizontalAlignment.Center; } for (int i = 0; i < this.txtGroup.Length; i++) { this.Controls.Add(this.txtGroup[i]); } nt = new NetTunnel(100); nt.Connect(address, 5000); nt.StartAsyncReceive(); nt.Send("useticket"); nt.Send(ticket); string tmp; nt.Receive(out tmp, 5000); getTableStatus(); string success; bool temp = nt.Receive(out success, 10000); MessageBox.Show(success + temp.ToString()); }
public GameRoom(string ticket) { InitializeComponent(); this.txtGroup = new System.Windows.Forms.TextBox[9]; for (int i = 0; i < this.txtGroup.Length; i++) { this.txtGroup[i] = new System.Windows.Forms.TextBox(); this.txtGroup[i].BackColor = System.Drawing.Color.Khaki; this.txtGroup[i].BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtGroup[i].Cursor = System.Windows.Forms.Cursors.Default; this.txtGroup[i].Location = new System.Drawing.Point(0, 0 + i * 25); this.txtGroup[i].Name = "txtGroup[" + i.ToString() + "]"; this.txtGroup[i].ReadOnly = true; this.txtGroup[i].Size = new System.Drawing.Size(107, 20); this.txtGroup[i].TabIndex = 0; this.txtGroup[i].TextAlign = System.Windows.Forms.HorizontalAlignment.Center; } for (int i = 0; i < this.txtGroup.Length; i++) { this.Controls.Add(this.txtGroup[i]); } nt = new NetTunnel(100); nt.Connect(address, 5000); nt.StartAsyncReceive(); nt.Send("useticket"); nt.Send(ticket); string tmp; nt.Receive(out tmp,5000); getTableStatus(); string success; bool temp = nt.Receive(out success, 10000); MessageBox.Show(success + temp.ToString()); }