Filtration/Filtration.ObjectModel/ThemeEditor/IconThemeComponent.cs

65 lines
1.8 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 IconThemeComponent : ThemeComponent
{
private IconSize _iconSize;
private IconColor _iconColor;
private IconShape _iconShape;
2018-11-28 16:50:42 -05:00
private IconThemeComponent()
{
}
2018-08-29 13:12:02 -04:00
public IconThemeComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape)
{
if (componentName == null)
{
throw new ArgumentException("Null parameters not allowed in IconThemeComponent constructor");
}
ComponentType = componentType;
ComponentName = componentName;
IconSize = componentIconSize;
IconColor = componentIconColor;
IconShape = componentIconShape;
}
public IconSize IconSize
{
2018-11-28 16:50:42 -05:00
get => _iconSize;
2018-08-29 13:12:02 -04:00
set
{
_iconSize = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public IconColor IconColor
{
2018-11-28 16:50:42 -05:00
get => _iconColor;
2018-08-29 13:12:02 -04:00
set
{
_iconColor = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public IconShape IconShape
{
2018-11-28 16:50:42 -05:00
get => _iconShape;
2018-08-29 13:12:02 -04:00
set
{
_iconShape = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
}
}