示例#1
0
 /**
  * Constructor with Astronauta
  * */
 public Astronauta(Astronauta u)
 {
     username = u.Username;
     ID       = u.Id;
     tipo     = u.Tipo;
     password = u.Password;
 }
示例#2
0
        //TODO
        public bool equals(Object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o == null || o.GetType() != this.GetType())
            {
                return(false);
            }

            Astronauta u = (Astronauta)o;

            return(username.Equals(u.Username) && ID.Equals(u.Id) && password.Equals(u.Password));
        }
 /**
  * Deserialization Constructor
  * */
 public DataBaseUser(SerializationInfo info, StreamingContext ctxt)
 {
     _user          = (Astronauta)info.GetValue("Astronauta", typeof(Astronauta));
     _software_list = (Dictionary <int, Missao>)info.GetValue("Missao_list", typeof(Dictionary <int, Missao>));
     _charac        = (Dictionary <int, CadernoDeNotas>)info.GetValue("CadernoDeNotas", typeof(Dictionary <int, CadernoDeNotas>));
 }
 /**
  * Constructor with Value
  * */
 public DataBaseUser(DataBaseUser db)
 {
     _user          = db.User;
     _software_list = db.Software_list;
     _charac        = db.Charac;
 }
 /**
  * Constructor with parameters
  * */
 public DataBaseUser(Astronauta user, Dictionary <int, Missao> software_list, Dictionary <int, CadernoDeNotas> charac)
 {
     _user          = user;
     _software_list = software_list;
     _charac        = charac;
 }
 /**
  * Constructor default
  * */
 public DataBaseUser()
 {
     _user          = new Astronauta();
     _software_list = new Dictionary <int, Missao>();
     _charac        = new Dictionary <int, CadernoDeNotas>();
 }