Exemple #1
0
 public void Update(ICalcConfig data)
 {
     this.Speed        = data.Speed;
     this.SpeedUnit    = data.SpeedUnit;
     this.IncomePerDay = data.IncomePerDay;
     this.CreatedOn    = data.CreatedOn;
     this.ModifiedOn   = data.ModifiedOn;
 }
Exemple #2
0
 public CalcConfigData(ICalcConfig data)
 {
     this.CoinCode     = data.CoinCode;
     this.Speed        = data.Speed;
     this.SpeedUnit    = data.SpeedUnit;
     this.IncomePerDay = data.IncomePerDay;
     this.CreatedOn    = data.CreatedOn;
     this.ModifiedOn   = data.ModifiedOn;
 }
Exemple #3
0
 public CalcConfigViewModel(ICalcConfig data)
 {
     _incomePerDay = data.IncomePerDay;
     _speed        = data.Speed;
     _speedUnit    = data.SpeedUnit;
     _coinCode     = data.CoinCode;
     _createdOn    = data.CreatedOn;
     _modifiedOn   = data.ModifiedOn;
 }
Exemple #4
0
 public bool TryGetCalcConfig(ICoin coin, out ICalcConfig calcConfig)
 {
     Init();
     if (!_dicByCoinCode.ContainsKey(coin.Code))
     {
         calcConfig = null;
         return(false);
     }
     calcConfig = _dicByCoinCode[coin.Code];
     return(true);
 }
Exemple #5
0
 public void Update(ICalcConfig data)
 {
     this.Speed            = data.Speed;
     this.SpeedUnit        = data.SpeedUnit;
     this.NetSpeed         = data.NetSpeed;
     this.BaseNetSpeed     = data.BaseNetSpeed;
     this.BaseNetSpeedUnit = data.BaseNetSpeedUnit;
     this.DayWave          = data.DayWave;
     this.NetSpeedUnit     = data.NetSpeedUnit;
     this.IncomePerDay     = data.IncomePerDay;
     this.IncomeUsdPerDay  = data.IncomeUsdPerDay;
     this.IncomeCnyPerDay  = data.IncomeCnyPerDay;
     this.CreatedOn        = data.CreatedOn;
     this.ModifiedOn       = data.ModifiedOn;
 }
 public CalcConfigViewModel(ICalcConfig data)
 {
     _incomePerDay     = data.IncomePerDay;
     _incomeUsdPerDay  = data.IncomeUsdPerDay;
     _incomeCnyPerDay  = data.IncomeCnyPerDay;
     _speed            = data.Speed;
     _speedUnit        = data.SpeedUnit;
     _netSpeed         = data.NetSpeed;
     _baseNetSpeed     = data.BaseNetSpeed;
     _baseNetSpeedUnit = data.BaseNetSpeedUnit;
     _dayWave          = data.DayWave;
     _netSpeedUnit     = data.NetSpeedUnit;
     _coinCode         = data.CoinCode;
     _createdOn        = data.CreatedOn;
     _modifiedOn       = data.ModifiedOn;
 }
Exemple #7
0
 public static CalcConfigData Create(ICalcConfig data)
 {
     return(new CalcConfigData {
         CoinCode = data.CoinCode,
         Speed = data.Speed,
         SpeedUnit = data.SpeedUnit,
         NetSpeed = data.NetSpeed,
         BaseNetSpeed = data.BaseNetSpeed,
         BaseNetSpeedUnit = data.BaseNetSpeedUnit,
         DayWave = data.DayWave,
         NetSpeedUnit = data.NetSpeedUnit,
         IncomePerDay = data.IncomePerDay,
         IncomeUsdPerDay = data.IncomeUsdPerDay,
         IncomeCnyPerDay = data.IncomeCnyPerDay,
         CreatedOn = data.CreatedOn,
         ModifiedOn = data.ModifiedOn
     });
 }