Add temporary block type for new type
This commit is contained in:
35
Filtration.ObjectModel/BlockItemBaseTypes/StringBlockItem.cs
Normal file
35
Filtration.ObjectModel/BlockItemBaseTypes/StringBlockItem.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace Filtration.ObjectModel.BlockItemBaseTypes
|
||||
{
|
||||
public abstract class StringBlockItem : BlockItemBase, IAudioVisualBlockItem
|
||||
{
|
||||
private string _value;
|
||||
|
||||
protected StringBlockItem()
|
||||
{
|
||||
}
|
||||
|
||||
protected StringBlockItem(string value)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public override string OutputText => PrefixText + " " + Value;
|
||||
|
||||
public override string SummaryText => string.Empty;
|
||||
public override Color SummaryBackgroundColor => Colors.Transparent;
|
||||
public override Color SummaryTextColor => Colors.Transparent;
|
||||
|
||||
public string Value
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
_value = value;
|
||||
IsDirty = true;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
Filtration.ObjectModel/BlockItemTypes/IconBlockItem.cs
Normal file
21
Filtration.ObjectModel/BlockItemTypes/IconBlockItem.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||
|
||||
namespace Filtration.ObjectModel.BlockItemTypes
|
||||
{
|
||||
public class IconBlockItem : StringBlockItem
|
||||
{
|
||||
public IconBlockItem()
|
||||
{
|
||||
Value = "Icon1";
|
||||
}
|
||||
|
||||
public IconBlockItem(string value) : base(value)
|
||||
{
|
||||
}
|
||||
|
||||
public override string PrefixText => "Icon";
|
||||
public override int MaximumAllowed => 1;
|
||||
public override string DisplayHeading => "Drop Icon";
|
||||
public override int SortOrder => 28;
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,7 @@
|
||||
<Compile Include="BlockItemBaseTypes\BooleanBlockItem.cs" />
|
||||
<Compile Include="BlockItemBaseTypes\ColorBlockItem.cs" />
|
||||
<Compile Include="BlockItemBaseTypes\DualIntegerBlockItem.cs" />
|
||||
<Compile Include="BlockItemBaseTypes\StringBlockItem.cs" />
|
||||
<Compile Include="BlockItemBaseTypes\StringIntBlockItem.cs" />
|
||||
<Compile Include="BlockItemBaseTypes\IntegerBlockItem.cs" />
|
||||
<Compile Include="BlockItemBaseTypes\NumericFilterPredicateBlockItem.cs" />
|
||||
@@ -65,6 +66,7 @@
|
||||
<Compile Include="BlockItemTypes\ElderMapBlockItem.cs" />
|
||||
<Compile Include="BlockItemTypes\GemLevelBlockItem.cs" />
|
||||
<Compile Include="BlockItemTypes\HasExplicitModBlockItem.cs" />
|
||||
<Compile Include="BlockItemTypes\IconBlockItem.cs" />
|
||||
<Compile Include="BlockItemTypes\ShapedMapBlockItem.cs" />
|
||||
<Compile Include="BlockItemTypes\ShaperItemBlockItem.cs" />
|
||||
<Compile Include="BlockItemTypes\ElderItemBlockItem.cs" />
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace Filtration.ObjectModel
|
||||
Color DisplayTextColor { get; }
|
||||
Color DisplayBorderColor { get; }
|
||||
double DisplayFontSize { get; }
|
||||
string DisplayIcon { get; }
|
||||
bool HasBlockItemOfType<T>();
|
||||
bool HasBlockGroupInParentHierarchy(ItemFilterBlockGroup targetBlockGroup, ItemFilterBlockGroup startingBlockGroup);
|
||||
}
|
||||
@@ -260,5 +261,14 @@ namespace Filtration.ObjectModel
|
||||
return fontSizeBlockItem?.Value ?? 34;
|
||||
}
|
||||
}
|
||||
|
||||
public string DisplayIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
var displayIcon = BlockItems.OfType<IconBlockItem>().FirstOrDefault();
|
||||
return (displayIcon != null) ? displayIcon.Value : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user