2015-06-07 10:13:09 -04:00
|
|
|
|
using System.Windows.Media;
|
2015-06-24 14:57:16 -04:00
|
|
|
|
using Filtration.ObjectModel.Enums;
|
|
|
|
|
using Filtration.ObjectModel.Extensions;
|
2015-07-09 17:05:42 -04:00
|
|
|
|
using Filtration.ObjectModel.LootExplosionStudio;
|
2015-06-04 13:15:54 -04:00
|
|
|
|
|
2015-06-24 14:57:16 -04:00
|
|
|
|
namespace Filtration.ObjectModel.BlockItemBaseTypes
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
2015-06-24 14:57:16 -04:00
|
|
|
|
public class ActionBlockItem : BlockItemBase
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
|
|
|
|
private BlockAction _action;
|
|
|
|
|
|
|
|
|
|
public ActionBlockItem(BlockAction action)
|
|
|
|
|
{
|
|
|
|
|
Action = action;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BlockAction Action
|
|
|
|
|
{
|
|
|
|
|
get { return _action; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_action = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
OnPropertyChanged("SummaryText");
|
|
|
|
|
OnPropertyChanged("SummaryBackgroundColor");
|
|
|
|
|
OnPropertyChanged("SummaryTextColor");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-23 17:21:10 -04:00
|
|
|
|
public override string OutputText
|
|
|
|
|
{
|
|
|
|
|
get { return Action.GetAttributeDescription(); }
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-07 10:13:09 -04:00
|
|
|
|
public override string PrefixText
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
|
|
|
|
get { return string.Empty; }
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-07 10:13:09 -04:00
|
|
|
|
public override int MaximumAllowed
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
|
|
|
|
get { return 1; }
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-07 10:13:09 -04:00
|
|
|
|
public override string DisplayHeading
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Action";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-07 10:13:09 -04:00
|
|
|
|
public override string SummaryText
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return Action == BlockAction.Show ? "Show" : "Hide";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-07 10:13:09 -04:00
|
|
|
|
public override Color SummaryBackgroundColor
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return Action == BlockAction.Show ? Colors.LimeGreen : Colors.OrangeRed;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-07 10:13:09 -04:00
|
|
|
|
public override Color SummaryTextColor
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return Action == BlockAction.Show ? Colors.Black : Colors.White;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-07 10:13:09 -04:00
|
|
|
|
public override int SortOrder { get { return 0; } }
|
2015-06-04 13:15:54 -04:00
|
|
|
|
|
2015-06-07 10:13:09 -04:00
|
|
|
|
public void ToggleAction()
|
2015-06-04 13:15:54 -04:00
|
|
|
|
{
|
2015-06-07 10:13:09 -04:00
|
|
|
|
Action = Action == BlockAction.Show ? BlockAction.Hide : BlockAction.Show;
|
2015-06-04 13:15:54 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|