コード例 #1
0
        public SubconditionControlViewModel(CraftingSubcondition subCondition, List <Affix> affixes, int index, PoeCrafting.Entities.ItemBase itemBase)
        {
            SubconditionName = string.IsNullOrEmpty(subCondition.Name) ? "JsonSubcondition " + index : subCondition.Name;

            Index            = index;
            SubCondition     = subCondition;
            AggregateTypeMin = subCondition.AggregateMin;
            AggregateTypeMax = subCondition.AggregateMax;

            PrefixConditionsModel = new SubconditionAffixesControlViewModel(subCondition.PrefixConditions, affixes, AffixType.Prefix, itemBase, subCondition.ValueType);
            SuffixConditionsModel = new SubconditionAffixesControlViewModel(subCondition.SuffixConditions, affixes, AffixType.Suffix, itemBase, subCondition.ValueType);
            MetaConditionsModel   = new SubconditionAffixesControlViewModel(subCondition.MetaConditions, affixes, AffixType.Meta, itemBase, subCondition.ValueType);

            PrefixConditions = new SubconditionAffixesControlView(PrefixConditionsModel);
            SuffixConditions = new SubconditionAffixesControlView(SuffixConditionsModel);
            MetaConditions   = new SubconditionAffixesControlView(MetaConditionsModel);

            SelectedAggregateType = subCondition.AggregateType.ToString();
            SelectedValueType     = subCondition.ValueType.ToString();
        }
コード例 #2
0
 public SubconditionAffixesControlView(SubconditionAffixesControlViewModel viewModel)
 {
     ViewModel = viewModel;
     InitializeComponent();
 }