Exemplo n.º 1
0
 public MGBAccountBaseSerializable(MGBAccountBase source)
 {
     this.ID       = source.ID;
     this.Name     = source.Name;
     this.Login    = source.Login;
     this.Password = source.Password;
     this.Position = source.Position;
 }
Exemplo n.º 2
0
 //value comparison not reference
 //ID and Name must be unique for different accounts
 //same Login and Position = same account
 public bool ValuesEquals(MGBAccountBase baseAccount)
 {
     if (baseAccount.ID == this._id || baseAccount.Name == this._name)
     {
         return(true);
     }
     else if (baseAccount.Login == this._login && baseAccount.Position == this._position)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 3
0
 //if wrong values returns default
 public bool ValidatedCopy(MGBAccountBase source)
 {
     this._id         = source.ID;
     this._name       = source.Name;
     this._login      = source.Login;
     this._password   = source.Password;
     this._position   = source.Position;
     this._used       = source.Used;
     this._pointsLeft = source.PointsLeft;
     if (this.Validate())
     {
         return(true);
     }
     else
     {
         this.Reset();
         return(false);
     }
 }
Exemplo n.º 4
0
 public MGBAccountBase(MGBAccountBase source)
 {
     this.ValidatedCopy(source);
 }
Exemplo n.º 5
0
 public MGBAccount(MGBAccountBase source) : this()
 {
     this._accountBase = source;
 }
Exemplo n.º 6
0
 //probably shouldn't exist empty object
 private MGBAccount()
 {
     this._accountBase = new MGBAccountBase();
     this._gamesLeft   = new MGBRewardArray();
     this._gameType    = MiniGameType.None;
 }