Esempio n. 1
0
        public Client()
        {
            InitializeComponent();
            client = new SimpleTcpClient();
            client.StringEncoder = Encoding.UTF8;
            client.DataReceived += Client_Received;

            winForm = new WinnerForm();
        }
Esempio n. 2
0
        public Server()
        {
            InitializeComponent();
            tcpServer               = new SimpleTcpServer();
            tcpServer.Delimiter     = 0x13;
            tcpServer.StringEncoder = Encoding.ASCII;
            tcpServer.DataReceived += Server_Recived;

            //klijen ulazi u server
            tcpServer.ClientConnected += Client_Connected;
            //klijent napusta server
            tcpServer.ClientDisconnected += Client_Disconnect;
            if (gameType == 3)
            {
                f      = new Form1();
                f.Text = "server";
            }
            if (gameType == 3)
            {
                g      = new GameFour();
                g.Text = "server";
            }
            winForm = new WinnerForm();
        }