2017-11-17 22:24:00 +01:00
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BS.Shared.DataContracts
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class TextbausteinDC : IFilterableDC
|
|
|
|
|
|
{
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
|
{
|
2022-08-19 13:53:32 +02:00
|
|
|
|
if (obj is TextbausteinDC y)
|
2017-11-17 22:24:00 +01:00
|
|
|
|
{
|
2022-08-19 13:53:32 +02:00
|
|
|
|
if(TextbausteinOid is null && y.TextbausteinOid is null)
|
2017-11-17 22:24:00 +01:00
|
|
|
|
{
|
|
|
|
|
|
return GetHashCode() == y.GetHashCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-08-19 13:53:32 +02:00
|
|
|
|
if (TextbausteinOid.HasValue && y.TextbausteinOid.HasValue)
|
2017-11-17 22:24:00 +01:00
|
|
|
|
{
|
|
|
|
|
|
return TextbausteinOid == y.TextbausteinOid;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
|
{
|
|
|
|
|
|
return GetType().Name.GetHashCode() ^ TextbausteinOid.GetHashCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return Name;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ActivationTypeId ActivationType { get; set; }
|
2022-08-19 13:53:32 +02:00
|
|
|
|
public string DetailDescription => Text;
|
|
|
|
|
|
public string FilterRelevants => Name + Text;
|
2017-11-17 22:24:00 +01:00
|
|
|
|
public string IconPath { get; private set; }
|
2022-08-19 13:53:32 +02:00
|
|
|
|
public string SimpleDescription => Name;
|
2017-11-17 22:24:00 +01:00
|
|
|
|
public bool SupportsActivationType { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
public long Version
|
|
|
|
|
|
{
|
2022-08-19 13:53:32 +02:00
|
|
|
|
get => TextbausteinVersion ?? 0;
|
|
|
|
|
|
set => TextbausteinVersion = value;
|
2017-11-17 22:24:00 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-08-19 13:53:32 +02:00
|
|
|
|
public SolidColorBrush FilterableBrush => new SolidColorBrush(Colors.Transparent);
|
2017-11-17 22:24:00 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|