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 { /// /// Represents a fine tuning item. /// /// public class FineTuneItem : ExtendedObject { public event Action SelectedChanged; public BrushStop BrushStop { get; set; } /// /// Gets or sets the brush stops. /// public List BrushStops { get; set; } private List _suggestions; /// /// Gets or sets the triplet suggestions. /// public List Suggestions { get { return _suggestions; } set { _suggestions = value; RaisePropertyChangedAuto(); } } private List _hiveSuggestions; /// /// Gets or sets the hive suggestions. /// public List HiveSuggestions { get { return _hiveSuggestions; } set { _hiveSuggestions = value; RaisePropertyChangedAuto(); } } private bool _isSelected; /// /// Gets or sets a value indicating whether this instance is selected. /// public bool IsSelected { get { return _isSelected; } set { _isSelected = value; RaisePropertyChangedAuto(); SelectedChanged?.Invoke(); } } private ColorConversionSuggestion _selectedSuggestion; /// /// Gets or sets the selected triplet suggestion. /// public ColorConversionSuggestion SelectedSuggestion { get { return _selectedSuggestion; } set { _selectedSuggestion = value; RaisePropertyChangedAuto(); } } private ColorConversionSuggestion _selectedHiveSuggestion; /// /// Gets or sets the selected hive suggestion. /// public ColorConversionSuggestion SelectedHiveSuggestion { get { return _selectedHiveSuggestion; } set { _selectedHiveSuggestion = value; RaisePropertyChangedAuto(); } } /// /// Initializes a new instance of the class. /// public FineTuneItem() { Suggestions = new List(); BrushStops = new List(); } /// /// Initializes a new instance of the class. /// /// The conversion output. public FineTuneItem(ConversionOutput conversionOutput) : this() { Suggestions = conversionOutput.CreateTrippletSuggestions(); HiveSuggestions = conversionOutput.CreateHiveSuggestions(); } } }