Esempio n. 1
0
        private void Load()
        {
            foreach (Aow2.Modding.Abilities.AbilityResource ability in Mod.Model.Data.Abilities.Values)
            {
                AbilityResourceVM newVM = AbilityViewModelFactory.Create(ability);
                _abilityListHelper.Add(newVM);
                Items.Dispatcher.InvokeAsync(() => _collection.Add(newVM), DispatcherPriority.Background);
            }

            _abilityListHelper.Sort(new DelegateComparer <AbilityResourceVM>((a1, a2) => a1.Name.CompareTo(a2.Name)));

            foreach (AbilityResourceVM ability in _abilityListHelper)
            {
                ability.AbilityListProvider = this;
            }
            IsLoaded = true;
            _loadedEvent.Set();
        }
Esempio n. 2
0
 public AbilityMaskCheckVM(AbilityResourceVM masked, AbilityResourceVM maskedBy)
 {
     Masked    = masked;
     MaskedBy  = maskedBy;
     IsChecked = Masked.Model.MaskingAbilities.Contains((int)maskedBy.ID);
 }