Fixed theme serialization/deserialization and added them toolbar icons

This commit is contained in:
Ben
2015-07-06 15:33:25 +01:00
parent a496ab9b42
commit 1b63f68eee
10 changed files with 46 additions and 34 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Media;
using System.Xml.Serialization;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor
@@ -17,6 +18,8 @@ namespace Filtration.ObjectModel.ThemeEditor
}
public string Name { get; set; }
[XmlIgnore]
public string FilePath { get; set; }
public ThemeComponentCollection Components

View File

@@ -2,6 +2,7 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Media;
using System.Xml.Serialization;
using Filtration.ObjectModel.Annotations;
using Filtration.ObjectModel.Enums;
@@ -13,7 +14,12 @@ namespace Filtration.ObjectModel.ThemeEditor
private Color _color;
private EventHandler _themeComponentUpdatedEventHandler;
private readonly object _eventLock = new object();
public ThemeComponent()
{
}
public ThemeComponent(ThemeComponentType componentType, string componentName, Color componentColor)
{
if (componentName == null || componentColor == null)
@@ -51,7 +57,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public event EventHandler ThemeComponentDeleted;
public string ComponentName { get; set; }
public ThemeComponentType ComponentType{ get; private set; }
public ThemeComponentType ComponentType{ get; set; }
public Color Color
{