예제 #1
0
        private void OnRemoveFilterBlockItemCommand(IItemFilterBlockItem blockItem)
        {
            BlockItems.Remove(blockItem);

            if (blockItem is IAudioVisualBlockItem)
            {
                blockItem.PropertyChanged -= OnAudioVisualBlockItemChanged;
                OnAudioVisualBlockItemChanged(this, EventArgs.Empty);
            }

            IsDirty = true;
        }
예제 #2
0
        public bool ItemBlockItemMatch(IItemFilterBlockItem blockItem, IItem item)
        {
            var blockItemType = blockItem.GetType();

            if (blockItemType == typeof(BaseTypeBlockItem))
            {
                return(BaseTypeBlockItemMatch((BaseTypeBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(ClassBlockItem))
            {
                return(ClassBlockItemMatch((ClassBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(DropLevelBlockItem))
            {
                return(DropLevelBlockItemMatch((DropLevelBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(HeightBlockItem))
            {
                return(HeightBlockItemMatch((HeightBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(ItemLevelBlockItem))
            {
                return(ItemLevelBlockItemMatch((ItemLevelBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(LinkedSocketsBlockItem))
            {
                return(LinkedSocketsBlockItemMatch((LinkedSocketsBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(QualityBlockItem))
            {
                return(QualityBlockItemMatch((QualityBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(RarityBlockItem))
            {
                return(RarityBlockItemMatch((RarityBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(SocketsBlockItem))
            {
                return(SocketsBlockItemMatch((SocketsBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(WidthBlockItem))
            {
                return(WidthBlockItemMatch((WidthBlockItem)blockItem, item));
            }

            if (blockItemType == typeof(SocketGroupBlockItem))
            {
                return(SocketGroupBlockItemMatch((SocketGroupBlockItem)blockItem, item));
            }

            return(false);
        }
        private void OnRemoveFilterBlockItemCommand(IItemFilterBlockItem blockItem)
        {
            BlockItems.Remove(blockItem);

            if (blockItem is IAudioVisualBlockItem)
            {
                blockItem.PropertyChanged -= OnAudioVisualBlockItemChanged;
                OnAudioVisualBlockItemChanged(this, EventArgs.Empty);
            }

            IsDirty = true;
        }