コード例 #1
0
        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);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 public PacoteRegisto(Utilizador u, string response)
 {
     this.u        = u;
     this.response = response;
 }
コード例 #4
0
 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();
 }