aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestWashingResult.cs
blob: 9d67cef70f6d47cc1971576ffaf8ec01119bf79c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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));
        //    }
        //}
    }
}