99 lines
2.7 KiB
C#
Executable File
99 lines
2.7 KiB
C#
Executable File
/* Settings.cs
|
|
* part of zaaReloaded2
|
|
*
|
|
* Copyright 2015 Daniel Kraus
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using zaaReloaded2.Formatter;
|
|
using zaaReloaded2.Controller.Elements;
|
|
|
|
namespace zaaReloaded2.Controller
|
|
{
|
|
/// <summary>
|
|
/// Holds settings related to controlling laboratory output.
|
|
/// </summary>
|
|
[Serializable]
|
|
public class Settings
|
|
{
|
|
#region Properties
|
|
|
|
/// <summary>
|
|
/// Gets or sets the name of these settings.
|
|
/// </summary>
|
|
public string Name { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the reference style.
|
|
/// </summary>
|
|
public ReferenceStyle ReferenceStyle { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets the list of controlling elements.
|
|
/// </summary>
|
|
public IList<ElementBase> Elements { get; private set; }
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
public Settings()
|
|
{
|
|
Elements = new List<ElementBase>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates a new Settings object with an initial
|
|
/// set of elements.
|
|
/// </summary>
|
|
/// <param name="initialElements">Set of ElementBase
|
|
/// object (or derived ones).</param>
|
|
public Settings(IList<ElementBase> initialElements)
|
|
{
|
|
Elements = initialElements;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates a new Settings object with an initial
|
|
/// set of elements and a name.
|
|
/// </summary>
|
|
/// <param name="initialElements">Set of ElementBase
|
|
/// object (or derived ones).</param>
|
|
/// <param name="name">Name of these settings.</param>
|
|
public Settings(string name, IList<ElementBase> initialElements)
|
|
: this(initialElements)
|
|
{
|
|
Name = name;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Public methods
|
|
|
|
/// <summary>
|
|
/// Adds an element to the list of Elements.
|
|
/// </summary>
|
|
/// <param name="element">Element to add.</param>
|
|
public void AddElement(ElementBase element)
|
|
{
|
|
Elements.Add(element);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|