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

@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
namespace zaaReloaded2.Controller.Elements
@ -27,7 +28,8 @@ namespace zaaReloaded2.Controller.Elements
/// Selects the time points of the last day in a given Formatter
/// object.
/// </summary>
class SelectLastDay : ControlElementBase
[Serializable]
public class SelectLastDay : ControlElementBase, ISerializable
{
public override string Label
{
@ -39,6 +41,13 @@ namespace zaaReloaded2.Controller.Elements
formatter.ProcessLastDay(this);
}
protected override ElementBase CreateInstance()
{
return new SelectLastDay(CloneChildren());
}
#region Constructors
public SelectLastDay() : base() { }
public SelectLastDay(FormatElementBase formatElement)
@ -49,9 +58,13 @@ namespace zaaReloaded2.Controller.Elements
: base(formatElements)
{ }
protected override ElementBase CreateInstance()
{
return new SelectLastDay(CloneChildren());
}
/// <summary>
/// Deserialization constructor.
/// </summary>
protected SelectLastDay(SerializationInfo info, StreamingContext context)
: base(info, context)
{ }
#endregion
}
}