Exemplo n.º 1
0
        private void OnAddFilterBlockItemCommand(Type blockItemType)
        {
            if (!AddBlockItemAllowed(blockItemType))
            {
                return;
            }
            var newBlockItem = (IItemFilterBlockItem)Activator.CreateInstance(blockItemType);

            BlockItems.Add(newBlockItem);
            IsDirty = true;
        }
Exemplo n.º 2
0
        private void OnAddAudioVisualBlockItemCommand(Type blockItemType)
        {
            if (!AddBlockItemAllowed(blockItemType))
            {
                return;
            }
            var newBlockItem = (IItemFilterBlockItem)Activator.CreateInstance(blockItemType);

            newBlockItem.PropertyChanged += OnAudioVisualBlockItemChanged;
            BlockItems.Add(newBlockItem);
            OnAudioVisualBlockItemChanged(this, EventArgs.Empty);
            IsDirty = true;
        }