Ejemplo n.º 1
0
        public CaClient(TcpClient cli, TasClient tas)
        {
            try
            {
                con = new ClientConnection();
                con.ConnectionClosed += con_ConnectionClosed;
                con.CommandRecieved  += con_CommandRecieved;

                this.tas               = tas;
                tas.BattleUserJoined  += tas_BattleUserJoined;
                tas.BattleInfoChanged += tas_BattleInfoChanged;

                con.Connect(cli);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex);
                throw;
            }
        }
Ejemplo n.º 2
0
        public CaClient(TcpClient cli, TasClient tas)
        {
            try
            {
                con = new ClientConnection();
                con.ConnectionClosed += con_ConnectionClosed;
                con.CommandRecieved += con_CommandRecieved;

                this.tas = tas;
                tas.BattleUserJoined += tas_BattleUserJoined;
                tas.BattleInfoChanged += tas_BattleInfoChanged;

                con.Connect(cli);
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex);
                throw;
            }
        }