Add a temporary block type for new beam feature

This commit is contained in:
azakhi
2018-08-22 13:15:50 +03:00
parent add7514ce7
commit 2a7df9a1ca
7 changed files with 82 additions and 7 deletions

View File

@@ -0,0 +1,21 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class BeamBlockItem : ColorBlockItem
{
public BeamBlockItem()
{
}
public BeamBlockItem(Color color) : base(color)
{
}
public override string PrefixText => "BeamColor";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Beam Color";
public override int SortOrder => 29;
}
}

View File

@@ -60,6 +60,7 @@
<Compile Include="BlockItemBaseTypes\StringListBlockItem.cs" />
<Compile Include="BlockItemTypes\BackgroundColorBlockItem.cs" />
<Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" />
<Compile Include="BlockItemTypes\BeamBlockItem.cs" />
<Compile Include="BlockItemTypes\BorderColorBlockItem.cs" />
<Compile Include="BlockItemTypes\ClassBlockItem.cs" />
<Compile Include="BlockItemTypes\DisableDropSoundBlockItem.cs" />

View File

@@ -24,6 +24,7 @@ namespace Filtration.ObjectModel
Color DisplayBorderColor { get; }
double DisplayFontSize { get; }
string DisplayIcon { get; }
Color DisplayBeamColor { get; }
bool HasBlockItemOfType<T>();
bool HasBlockGroupInParentHierarchy(ItemFilterBlockGroup targetBlockGroup, ItemFilterBlockGroup startingBlockGroup);
}
@@ -270,5 +271,14 @@ namespace Filtration.ObjectModel
return (displayIcon != null) ? displayIcon.Value : "";
}
}
public Color DisplayBeamColor
{
get
{
var beamBlockItem = BlockItems.OfType<BeamBlockItem>().FirstOrDefault();
return beamBlockItem?.Color ?? new Color { A = 0, R = 0, G = 0, B = 0 };
}
}
}
}