blob: c03be1ae97f99c0a14542495c70d22ef20bc50fe (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.ColorConversion;
using Tango.Core;
using Tango.PMR.ColorLab;
namespace Tango.PPC.Common.Models
{
/// <summary>
/// Represents a fine tuning item.
/// </summary>
/// <seealso cref="Tango.Core.ExtendedObject" />
public class FineTuneItem : ExtendedObject
{
public event Action SelectedChanged;
public BrushStop BrushStop { get; set; }
/// <summary>
/// Gets or sets the brush stops.
/// </summary>
public List<BrushStop> BrushStops { get; set; }
private List<ColorConversionSuggestion> _suggestions;
/// <summary>
/// Gets or sets the triplet suggestions.
/// </summary>
public List<ColorConversionSuggestion> Suggestions
{
get { return _suggestions; }
set { _suggestions = value; RaisePropertyChangedAuto(); }
}
private List<ColorConversionSuggestion> _hiveSuggestions;
/// <summary>
/// Gets or sets the hive suggestions.
/// </summary>
public List<ColorConversionSuggestion> HiveSuggestions
{
get { return _hiveSuggestions; }
set { _hiveSuggestions = value; RaisePropertyChangedAuto(); }
}
private bool _isSelected;
/// <summary>
/// Gets or sets a value indicating whether this instance is selected.
/// </summary>
public bool IsSelected
{
get { return _isSelected; }
set { _isSelected = value; RaisePropertyChangedAuto(); SelectedChanged?.Invoke(); }
}
private ColorConversionSuggestion _selectedSuggestion;
/// <summary>
/// Gets or sets the selected triplet suggestion.
/// </summary>
public ColorConversionSuggestion SelectedSuggestion
{
get { return _selectedSuggestion; }
set { _selectedSuggestion = value; RaisePropertyChangedAuto(); }
}
private ColorConversionSuggestion _selectedHiveSuggestion;
/// <summary>
/// Gets or sets the selected hive suggestion.
/// </summary>
public ColorConversionSuggestion SelectedHiveSuggestion
{
get { return _selectedHiveSuggestion; }
set { _selectedHiveSuggestion = value; RaisePropertyChangedAuto(); }
}
/// <summary>
/// Initializes a new instance of the <see cref="FineTuneItem"/> class.
/// </summary>
public FineTuneItem()
{
Suggestions = new List<ColorConversionSuggestion>();
BrushStops = new List<BrushStop>();
}
/// <summary>
/// Initializes a new instance of the <see cref="FineTuneItem"/> class.
/// </summary>
/// <param name="conversionOutput">The conversion output.</param>
public FineTuneItem(ConversionOutput conversionOutput) : this()
{
Suggestions = conversionOutput.CreateTrippletSuggestions();
HiveSuggestions = conversionOutput.CreateHiveSuggestions();
}
}
}
|