public int Deserialize(byte[] b, int a) { this.u = new Utilizador(); int size = u.Deserialize(b, a); int responseL = BitConverter.ToInt32(b, a + size); this.response = (Encoding.ASCII.GetString(b, a + size + 4, responseL)); return(size + 4 + responseL); }
public PacoteLogin(Utilizador u, string response) { this.u = u; if (u is Cliente) { tipo = 1; } else { if (u is Proprietario) { tipo = 0; } else { tipo = (-1); } } this.response = response; }
public PacoteRegisto(Utilizador u, string response) { this.u = u; this.response = response; }
public Utilizador(Utilizador u) { this.idUtilizador = u.GetIdUtilizador(); this.idade = u.GetIdade(); this.nome = u.GetNome(); this.username = u.GetNome(); this.password = u.GetPassword(); this.email = u.GetEmail(); }