Filtration/Filtration.ObjectModel/ThemeEditor/EffectColorThemeComponent.cs

47 lines
1.3 KiB
C#
Raw Normal View History

2018-08-29 13:12:02 -04:00
using System;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor
{
[Serializable]
public class EffectColorThemeComponent : ThemeComponent
{
private EffectColor _effectColor;
private bool _temporary;
2018-11-28 16:50:42 -05:00
private EffectColorThemeComponent()
2018-08-29 13:12:02 -04:00
{
2018-11-28 16:50:42 -05:00
}
2018-08-29 13:12:02 -04:00
2018-11-28 16:50:42 -05:00
public EffectColorThemeComponent(ThemeComponentType componentType, string componentName, EffectColor componentEffectColor, bool componentTemporary)
{
2018-08-29 13:12:02 -04:00
ComponentType = componentType;
2018-11-28 16:50:42 -05:00
ComponentName = componentName ?? throw new ArgumentException("Null parameters not allowed in EffectColorThemeComponent constructor");
2018-08-29 13:12:02 -04:00
EffectColor = componentEffectColor;
Temporary = componentTemporary;
}
public EffectColor EffectColor
{
2018-11-28 16:50:42 -05:00
get => _effectColor;
2018-08-29 13:12:02 -04:00
set
{
_effectColor = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public bool Temporary
{
2018-11-28 16:50:42 -05:00
get => _temporary;
2018-08-29 13:12:02 -04:00
set
{
_temporary = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
}
}