2017-09-26 13:30:20 +02:00
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BS.Shared.DataContracts
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class TextModuleDC : IFilterableDC
|
|
|
|
|
|
{
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
|
{
|
2018-01-05 19:13:18 -04:00
|
|
|
|
if (obj is TextModuleDC y)
|
2017-09-26 13:30:20 +02:00
|
|
|
|
{
|
|
|
|
|
|
if (TextModuleOid == null && y.TextModuleOid == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return GetHashCode() == y.GetHashCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (TextModuleOid != null && y.TextModuleOid != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return TextModuleOid == y.TextModuleOid;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
|
{
|
|
|
|
|
|
return GetType().Name.GetHashCode() ^ TextModuleOid.GetHashCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return Name;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-01-05 19:13:18 -04:00
|
|
|
|
public string DetailDescription => Text;
|
|
|
|
|
|
public string FilterRelevants => Name + Text;
|
2017-09-26 13:30:20 +02:00
|
|
|
|
public string IconPath { get; private set; }
|
2018-01-05 19:13:18 -04:00
|
|
|
|
public string SimpleDescription => Name;
|
2017-09-26 13:30:20 +02:00
|
|
|
|
public bool SupportsActivationType { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
public long Version
|
|
|
|
|
|
{
|
2018-01-05 19:13:18 -04:00
|
|
|
|
get => TextModuleVersion ?? 0;
|
|
|
|
|
|
set => TextModuleVersion = value;
|
2017-09-26 13:30:20 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2018-01-05 19:13:18 -04:00
|
|
|
|
public SolidColorBrush FilterableBrush => new SolidColorBrush(Colors.Transparent);
|
2018-01-16 17:11:02 +01:00
|
|
|
|
|
|
|
|
|
|
public long? KeyField => TextModuleOid;
|
|
|
|
|
|
|
|
|
|
|
|
public long? ParentField => Parent?.TextModuleOid;
|
2017-09-26 13:30:20 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|