Add a temporary block type for new beam feature
This commit is contained in:
21
Filtration.ObjectModel/BlockItemTypes/BeamBlockItem.cs
Normal file
21
Filtration.ObjectModel/BlockItemTypes/BeamBlockItem.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -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" />
|
||||
|
||||
@@ -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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user