Пример #1
0
 public PackPropertyItemModel(PickProperty p) // loading item
 {
     PropertyDef    = p;
     ActiveProperty = CustomProperties.FirstOrDefault(x => (x as PropertyItemViewModel).Name == PropertyDef.Name) as PropertyItemViewModel;
     RemoveCommand  = new RelayCommand(Remove);
     Messenger.Default.Register <CustomPropertyChangedMessage>(this, action => CustomPropertyChanged(action));
 }
Пример #2
0
 public PackagePropertyModel(PackagePropertyModel p, IdeCollection <IdeBaseItem> src) : base(src) // copy item
 {
     PropertyDef       = new PickProperty();
     ActiveProperty    = p.ActiveProperty;
     PropertyDef.Value = p.PropertyDef.Value;
     Messenger.Default.Register <CustomPropertyChangedMessage>(this, action => CustomPropertyChanged(action));
 }
Пример #3
0
 public PackPropertyItemModel() // new item
 {
     PropertyDef    = new PickProperty();
     ActiveProperty = CustomProperties.First() as PropertyItemViewModel;
     RemoveCommand  = new RelayCommand(Remove);
     Messenger.Default.Register <CustomPropertyChangedMessage>(this, action => CustomPropertyChanged(action));
 }
Пример #4
0
 public PackPropertyItemModel(PackPropertyItemModel p) // copy item
 {
     PropertyDef       = new PickProperty();
     ActiveProperty    = p.ActiveProperty;
     PropertyDef.Value = p.PropertyDef.Value;
     RemoveCommand     = new RelayCommand(Remove);
     Messenger.Default.Register <CustomPropertyChangedMessage>(this, action => CustomPropertyChanged(action));
 }
Пример #5
0
 public PackagePropertyModel(PickProperty p, IdeCollection <IdeBaseItem> src) : base(src) // loading item
 {
     if (p is NamePickProperty)
     {
         _def = new PickProperty
         {
             Property = PropertyTabViewModel.NameProperty._property,
             Value    = p.Value
         };
         ActiveProperty = PropertyTabViewModel.NameProperty;
     }
     else
     {
         _def           = (PickProperty)p;
         ActiveProperty = (PropertyItemModel)CustomProperties.FirstOrDefault(x => ((PropertyItemModel)x)._property == _def.Property);
     }
     Messenger.Default.Register <CustomPropertyChangedMessage>(this, action => CustomPropertyChanged(action));
 }
Пример #6
0
 public PackagePropertyModel(PickProperty p, IdeCollection <IdeBaseItem> src) : base(src) // loading item
 {
     PropertyDef    = p;
     ActiveProperty = (PropertyItemModel)CustomProperties.FirstOrDefault(x => ((PropertyItemModel)x)._property == PropertyDef.Property);
     Messenger.Default.Register <CustomPropertyChangedMessage>(this, action => CustomPropertyChanged(action));
 }
Пример #7
0
 public PackagePropertyModel(IdeCollection <IdeBaseItem> src) : base(src) // new item
 {
     PropertyDef    = new PickProperty();
     ActiveProperty = (PropertyItemModel)CustomProperties.First();
     Messenger.Default.Register <CustomPropertyChangedMessage>(this, action => CustomPropertyChanged(action));
 }