Filtration/Filtration.ObjectModel/ThemeEditor/StrIntThemeComponent.cs

52 lines
1.4 KiB
C#
Raw Permalink Normal View History

2018-08-26 13:24:13 -04:00
using System;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor
{
[Serializable]
public class StrIntThemeComponent : ThemeComponent
{
private string _value;
private int _secondValue;
2018-11-28 16:50:42 -05:00
private StrIntThemeComponent()
{
}
2018-08-26 13:24:13 -04:00
public StrIntThemeComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue)
{
if (componentName == null || componentValue == null)
{
throw new ArgumentException("Null parameters not allowed in StrIntThemeComponent constructor");
}
ComponentType = componentType;
Value = componentValue;
SecondValue = componentSecondValue;
ComponentName = componentName;
}
public string Value
{
2018-11-28 16:50:42 -05:00
get => _value;
2018-08-26 13:24:13 -04:00
set
{
_value = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public int SecondValue
{
2018-11-28 16:50:42 -05:00
get => _secondValue;
2018-08-26 13:24:13 -04:00
set
{
_secondValue = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
}
}