Implement serialization of Settings and SettingsRepository.

- FIX: Stile werden jetzt gespeichert.
This commit is contained in:
Daniel Kraus
2015-08-11 16:12:39 +02:00
parent 53d13b394e
commit c9fc4a5fae
21 changed files with 593 additions and 44 deletions

View File

@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
namespace zaaReloaded2.Controller.Elements
@ -25,7 +26,8 @@ namespace zaaReloaded2.Controller.Elements
/// <summary>
/// Controller element that writes arbitrary text to the document.
/// </summary>
class CustomText : FormatElementBase
[Serializable]
public class CustomText : FormatElementBase, ISerializable
{
public override string Label
{
@ -43,5 +45,20 @@ namespace zaaReloaded2.Controller.Elements
clone.Content = Content;
return clone;
}
#region Constructors
public CustomText () { }
/// <summary>
/// Deserialization constructor.
/// </summary>
protected CustomText(SerializationInfo info, StreamingContext context)
{
int version = info.GetInt32("Version");
Content = info.GetString("Content");
}
#endregion
}
}