using ColorMine.ColorSpaces; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Media; namespace Tango.BL.Entities { public class RmlExtensionTestWashingResult: RmlExtensionTestWashingResultBase { public RmlExtensionTestWashingResult(): base() { } [NotMapped] [JsonIgnore] public string GetMaterialName { get { return WashingTestMaterials != null ? WashingTestMaterials.Name : ""; } } //[NotMapped] //[JsonIgnore] //public Color ColorValue //{ // get // { // byte[] bytes = BitConverter.GetBytes(Color); // var color1 = new SolidColorBrush(System.Windows.Media.Color.FromArgb(bytes[3], bytes[2], bytes[1], bytes[0])); // return System.Windows.Media.Color.FromRgb(bytes[2], bytes[1], bytes[0]); // } // set // { // int v = ColorToInteger(value); // int colorCodeWithAlpha = BitConverter.ToInt32(new byte[] { value.B, value.G, value.R, value.A }, 0); // Color = colorCodeWithAlpha; // RaisePropertyChanged(nameof(Color)); // } //} } }