2015-06-07 18:56:55 +01:00
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
using System.Windows.Media;
|
2015-06-24 19:57:16 +01:00
|
|
|
|
using Filtration.ObjectModel.Annotations;
|
2018-12-05 01:59:10 -05:00
|
|
|
|
using Filtration.ObjectModel.Enums;
|
2015-06-07 18:56:55 +01:00
|
|
|
|
|
2015-06-24 19:57:16 +01:00
|
|
|
|
namespace Filtration.ObjectModel.BlockItemBaseTypes
|
2015-06-07 18:56:55 +01:00
|
|
|
|
{
|
2015-06-24 19:57:16 +01:00
|
|
|
|
public abstract class BlockItemBase : IItemFilterBlockItem
|
2015-06-07 18:56:55 +01:00
|
|
|
|
{
|
2016-12-03 11:58:18 +00:00
|
|
|
|
private bool _isDirty;
|
|
|
|
|
|
2015-06-07 18:56:55 +01:00
|
|
|
|
public abstract string PrefixText { get; }
|
2015-06-23 22:21:10 +01:00
|
|
|
|
public abstract string OutputText { get; }
|
2015-06-07 18:56:55 +01:00
|
|
|
|
public abstract int MaximumAllowed { get; }
|
|
|
|
|
public abstract string DisplayHeading { get; }
|
|
|
|
|
public abstract string SummaryText { get; }
|
|
|
|
|
public abstract Color SummaryBackgroundColor { get; }
|
|
|
|
|
public abstract Color SummaryTextColor { get; }
|
2018-12-05 01:59:10 -05:00
|
|
|
|
public abstract BlockItemOrdering SortOrder { get; }
|
2018-08-31 11:21:43 +03:00
|
|
|
|
public string Comment { get; set; }
|
2016-12-03 11:58:18 +00:00
|
|
|
|
|
|
|
|
|
public bool IsDirty
|
|
|
|
|
{
|
|
|
|
|
get { return _isDirty; }
|
|
|
|
|
protected set
|
|
|
|
|
{
|
|
|
|
|
_isDirty = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-06-07 18:56:55 +01:00
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
2018-12-05 01:59:10 -05:00
|
|
|
|
|
2015-06-07 18:56:55 +01:00
|
|
|
|
[NotifyPropertyChangedInvocator]
|
|
|
|
|
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
|
|
|
{
|
|
|
|
|
var handler = PropertyChanged;
|
2015-12-13 20:17:15 +00:00
|
|
|
|
handler?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
2015-06-07 18:56:55 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|