40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
|
using System;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Runtime.CompilerServices;
|
|||
|
using System.Windows.Media;
|
|||
|
using Filtration.ObjectModel.Annotations;
|
|||
|
using Filtration.ObjectModel.Enums;
|
|||
|
|
|||
|
namespace Filtration.ObjectModel.ThemeEditor
|
|||
|
{
|
|||
|
[Serializable]
|
|||
|
public class ColorThemeComponent : ThemeComponent
|
|||
|
{
|
|||
|
private Color _color;
|
|||
|
private readonly object _eventLock = new object();
|
|||
|
|
|||
|
public ColorThemeComponent(ThemeComponentType componentType, string componentName, Color componentColor)
|
|||
|
{
|
|||
|
if (componentName == null || componentColor == null)
|
|||
|
{
|
|||
|
throw new ArgumentException("Null parameters not allowed in ColorThemeComponent constructor");
|
|||
|
}
|
|||
|
|
|||
|
ComponentType = componentType;
|
|||
|
Color = componentColor;
|
|||
|
ComponentName = componentName;
|
|||
|
}
|
|||
|
|
|||
|
public Color Color
|
|||
|
{
|
|||
|
get { return _color; }
|
|||
|
set
|
|||
|
{
|
|||
|
_color = value;
|
|||
|
OnPropertyChanged();
|
|||
|
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|