Ejemplo n.º 1
0
        public void OnSwagItemChanged(SwagItemBase swagItem, PropertyChangedEventArgs e)
        {
            SwagOption opt = (SwagOption)swagItem;

            switch (e)
            {
            case PropertyChangedExtendedEventArgs exArgs:
                SwagItemChanged?.Invoke(this, new SwagItemChangedEventArgs()
                {
                    SwagItem            = swagItem,
                    PropertyChangedArgs = e,
                    Message             = $"{opt.Name}({exArgs.PropertyName})\n\t{exArgs.OldValue} => {exArgs.NewValue}"
                });
                break;

            case CollectionPropertyChangedEventArgs colArgs:
                SwagItemChanged?.Invoke(this, new SwagItemChangedEventArgs()
                {
                    SwagItem            = swagItem,
                    PropertyChangedArgs = e,
                    Message             = $"{opt.Name}({colArgs.PropertyName})\n\t[OLD] => {colArgs.OldItems}\n\t[NEW] {colArgs.NewItems}"
                });
                break;
            }

            Parent?.OnSwagItemChanged(swagItem, e);
        }
Ejemplo n.º 2
0
 public virtual void OnSwagItemChanged(SwagItemBase swagItem, PropertyChangedEventArgs e)
 {
     SwagItemChanged?.Invoke(this, new SwagItemChangedEventArgs()
     {
         SwagItem = swagItem, PropertyChangedArgs = e
     });
 }
Ejemplo n.º 3
0
        public virtual void OnSwagItemChanged(SwagItemBase swagItem, PropertyChangedEventArgs e)
        {
            SwagSetting swagSetting = (SwagSetting)swagItem;
            PropertyChangedExtendedEventArgs exArgs = (PropertyChangedExtendedEventArgs)e;

            SwagItemChanged?.Invoke(this, new SwagItemChangedEventArgs()
            {
                SwagItem            = swagItem,
                PropertyChangedArgs = e,
                Message             = $"{swagSetting.Path}({exArgs.PropertyName})\n\t{exArgs.OldValue} => {exArgs.NewValue}"
            });
            Parent?.OnSwagItemChanged(swagItem, e);
        }