FIL-11 Added BlockGroupsEnabled flag to ItemFilterScript (encapsulated in new ItemFilterScriptSettings object)

This commit is contained in:
Ben Wallis
2017-05-14 13:02:30 +01:00
parent bb77138854
commit ab7aefa8a6
9 changed files with 150 additions and 99 deletions

View File

@@ -84,6 +84,7 @@
<Compile Include="ItemFilterBlock.cs" />
<Compile Include="ItemFilterBlockGroup.cs" />
<Compile Include="ItemFilterScript.cs" />
<Compile Include="ItemFilterScriptSettings.cs" />
<Compile Include="ItemFilterSection.cs" />
<Compile Include="ItemSet.cs" />
<Compile Include="NumericFilterPredicate.cs" />

View File

@@ -15,6 +15,8 @@ namespace Filtration.ObjectModel
string FilePath { get; set; }
string Description { get; set; }
DateTime DateModified { get; set; }
IItemFilterScriptSettings ItemFilterScriptSettings { get; }
List<string> Validate();
void ReplaceColors(ReplaceColorsParameterSet replaceColorsParameterSet);
}
@@ -29,6 +31,7 @@ namespace Filtration.ObjectModel
new ItemFilterBlockGroup("Root", null)
};
ThemeComponents = new ThemeComponentCollection { IsMasterCollection = true};
ItemFilterScriptSettings = new ItemFilterScriptSettings(ThemeComponents);
}
public ObservableCollection<IItemFilterBlock> ItemFilterBlocks { get; }
@@ -36,6 +39,8 @@ namespace Filtration.ObjectModel
public ThemeComponentCollection ThemeComponents { get; set; }
public IItemFilterScriptSettings ItemFilterScriptSettings { get; }
public string FilePath { get; set; }
public string Description { get; set; }
public DateTime DateModified { get; set; }

View File

@@ -0,0 +1,21 @@
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel
{
public interface IItemFilterScriptSettings
{
bool BlockGroupsEnabled { get; set; }
ThemeComponentCollection ThemeComponentCollection { get; }
}
public class ItemFilterScriptSettings : IItemFilterScriptSettings
{
public ItemFilterScriptSettings(ThemeComponentCollection themeComponentCollection)
{
ThemeComponentCollection = themeComponentCollection;
}
public bool BlockGroupsEnabled { get; set; }
public ThemeComponentCollection ThemeComponentCollection { get; }
}
}