This commit is contained in:
staccatomamba
2017-09-26 13:30:20 +02:00
parent 226f039b78
commit bab0ad6568
11 changed files with 1125 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
using System.Windows.Media;
namespace BS.Shared.DataContracts
{
public partial class TextModuleDC : IFilterableDC
{
public override bool Equals(object obj)
{
if (obj is TextModuleDC)
{
var y = (TextModuleDC) obj;
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;
}
public ActivationTypeId ActivationType { get; set; }
public string DetailDescription { get { return Text; } }
public string FilterRelevants { get { return Name + Text; } }
public string IconPath { get; private set; }
public string SimpleDescription { get { return Name; } }
public bool SupportsActivationType { get; private set; }
public long Version
{
get { return TextModuleVersion == null ? 0 : TextModuleVersion.Value; }
set { TextModuleVersion = value; }
}
public SolidColorBrush FilterableBrush { get { return new SolidColorBrush(Colors.Transparent); } }
}
}