Add custom sound theme support

This commit is contained in:
azakhi
2018-08-29 13:11:41 +03:00
parent 2958d93b33
commit a09f0a5090
24 changed files with 255 additions and 14 deletions

View File

@@ -48,6 +48,19 @@ namespace Filtration.ObjectModel.ThemeEditor
return component;
}
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, string componentValue)
{
if (ComponentExists(componentType, componentName))
{
return Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType);
}
var component = new StringThemeComponent(componentType, componentName, componentValue);
Items.Add(component);
return component;
}
private bool ComponentExists(ThemeComponentType componentType, string componentName)
{
var componentCount =