Add requested changes
This commit is contained in:
parent
8f0f73f185
commit
c260014a16
|
@ -180,21 +180,13 @@ namespace Filtration.ViewModels
|
||||||
_scriptCommandManager = Script.CommandManager;
|
_scriptCommandManager = Script.CommandManager;
|
||||||
AddItemFilterBlockViewModels(Script.ItemFilterBlocks, -1);
|
AddItemFilterBlockViewModels(Script.ItemFilterBlocks, -1);
|
||||||
|
|
||||||
foreach(var block in Script.ItemFilterBlocks)
|
foreach(var block in Script.ItemFilterBlocks.OfType<IItemFilterBlock>())
|
||||||
{
|
{
|
||||||
var itemBlock = block as IItemFilterBlock;
|
foreach (var customSoundBlockItem in block.BlockItems.OfType<CustomSoundBlockItem>())
|
||||||
if(itemBlock != null)
|
|
||||||
{
|
{
|
||||||
foreach(var blockItem in itemBlock.BlockItems)
|
if (!string.IsNullOrWhiteSpace(customSoundBlockItem.Value) && CustomSoundsAvailable.IndexOf(customSoundBlockItem.Value) < 0)
|
||||||
{
|
{
|
||||||
var customSoundBlockItem = blockItem as CustomSoundBlockItem;
|
CustomSoundsAvailable.Add(customSoundBlockItem.Value);
|
||||||
if (customSoundBlockItem != null)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrWhiteSpace(customSoundBlockItem.Value) && _customSoundsAvailable.IndexOf(customSoundBlockItem.Value) < 0)
|
|
||||||
{
|
|
||||||
CustomSoundsAvailable.Add(customSoundBlockItem.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -273,15 +265,11 @@ namespace Filtration.ViewModels
|
||||||
var itemBlock = itemFilterBlock as IItemFilterBlock;
|
var itemBlock = itemFilterBlock as IItemFilterBlock;
|
||||||
if (itemBlock != null)
|
if (itemBlock != null)
|
||||||
{
|
{
|
||||||
foreach (var blockItem in itemBlock.BlockItems)
|
foreach (var customSoundBlockItem in itemBlock.BlockItems.OfType<CustomSoundBlockItem>())
|
||||||
{
|
{
|
||||||
var customSoundBlockItem = blockItem as CustomSoundBlockItem;
|
if (!string.IsNullOrWhiteSpace(customSoundBlockItem.Value) && CustomSoundsAvailable.IndexOf(customSoundBlockItem.Value) < 0)
|
||||||
if (customSoundBlockItem != null)
|
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(customSoundBlockItem.Value) && _customSoundsAvailable.IndexOf(customSoundBlockItem.Value) < 0)
|
CustomSoundsAvailable.Add(customSoundBlockItem.Value);
|
||||||
{
|
|
||||||
CustomSoundsAvailable.Add(customSoundBlockItem.Value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue