Implement serialization of Settings and SettingsRepository.
- FIX: Stile werden jetzt gespeichert.
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user