private void OnAddFilterBlockItemCommand(Type blockItemType) { if (!AddBlockItemAllowed(blockItemType)) { return; } var newBlockItem = (IItemFilterBlockItem)Activator.CreateInstance(blockItemType); BlockItems.Add(newBlockItem); IsDirty = true; }
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; }