public override void Initialise() { _jewelModelSCDVM = new SelectionControlDVM <JewelModel, JewelModelDataViewModel>( () => DataObject().JewelModelId, val => { DataObject().JewelModelId = DomainClassBase <JewelModel> .IdOrNullId(val); OnPropertyChanged(nameof(JewelModelSelected)); }); _weaponModelSCDVM = new SelectionControlDVM <WeaponModel, WeaponModelDataViewModel>( () => DataObject().WeaponModelId, val => { DataObject().WeaponModelId = DomainClassBase <WeaponModel> .IdOrNullId(val); OnPropertyChanged(nameof(WeaponModelSelected)); }); _factorSliderDVM = new SliderDataViewModel <double>( new Scaler <double>(WeaponJewelMatch.LegalMatchFactors, (a, b) => a < b), WeaponJewelMatch.LegalMatchFactors.Count - 1, () => DataObject().Factor, val => { DataObject().Factor = val; OnPropertyChanged(nameof(FactorIndex)); OnPropertyChanged(nameof(Factor)); }); }
public override void Initialise() { _minDamageSliderDVM = new SliderDataViewModel <int>( new Scaler <int>(WeaponModel.LegalDamageValues, (a, b) => a < b), WeaponModel.LegalDamageValues.Count - 1, () => DataObject().MinDamage, val => { DataObject().MinDamage = val; OnPropertyChanged(nameof(MinDamageIndex)); OnPropertyChanged(nameof(MinDamage)); }, CheckRulesMinDamage); _maxDamageSliderDVM = new SliderDataViewModel <int>( new Scaler <int>(WeaponModel.LegalDamageValues, (a, b) => a < b), WeaponModel.LegalDamageValues.Count - 1, () => DataObject().MaxDamage, val => { DataObject().MaxDamage = val; OnPropertyChanged(nameof(MaxDamageIndex)); OnPropertyChanged(nameof(MaxDamage)); }, CheckRulesMaxDamage); _jewelSocketsSliderDVM = new IntSliderDataViewModel( WeaponModel.MaxNoOfJewelSockets, () => DataObject().JewelSockets, val => { DataObject().JewelSockets = val; OnPropertyChanged(nameof(JewelSocketsIndex)); OnPropertyChanged(nameof(JewelSockets)); }); _rarityTierSCDVM = new SelectionControlDVM <RarityTier, RarityTierDataViewModel>( () => DataObject().RarityTierId, val => { DataObject().RarityTierId = DomainClassBase <RarityTier> .IdOrNullId(val); OnPropertyChanged(nameof(RaritySelected)); }); _weaponTypeSCDVM = new SelectionControlDVM <WeaponType, WeaponTypeDataViewModel>( () => DataObject().WeaponTypeId, val => { DataObject().WeaponTypeId = DomainClassBase <WeaponType> .IdOrNullId(val); OnPropertyChanged(nameof(WeaponTypeSelected)); }); }
public override void Initialise() { _factorSliderDVM = new SliderDataViewModel <double>( new Scaler <double>(JewelCutQuality.LegalCutQualityValues, (a, b) => a < b), JewelCutQuality.LegalCutQualityValues.Count - 1, () => DataObject().Factor, val => { DataObject().Factor = val; OnPropertyChanged(nameof(FactorIndex)); OnPropertyChanged(nameof(Factor)); }); }