public ServerClientThread(TcpClient tcpClient, Server server)
 {
     this.tcpClient = tcpClient;
     this.server = server;
     this.reader = new StreamReader(tcpClient.GetStream(), Encoding.ASCII);
     this.writer = new StreamWriter(tcpClient.GetStream(), Encoding.ASCII);
 }
 public GameForm(Server server, string name)
 {
     DoubleBuffered = true;
     this.server = server;
     this.name = name.Remove(0,9).Replace(System.Environment.NewLine, "");
     StartGame();
     this.LabelPlayerNumber.Text += "1";
 }
Exemple #3
0
 public NewGame(bool isHost, string name, Form oldForm)
 {
     this.oldForm = oldForm;
     Player1 = name;
     server = new Server();
     this.isHost = isHost;
     InitializeComponent();
     this.button_Start.Hide();
     label_PlayerOne.Text += Player1;
     label_IP.Text += "127.0.0.1";
     label_Port.Text += "1000";
     //Packet_NameMessage temp1 = (Packet_NameMessage)client.received;
     //label_Player2.Text += temp1.message;
 }
 public OpponentForm(Server server, GameForm form)
 {
     this.form = form;
     this.server = server;
     StartGame();
 }