2013-11-18 18:06:17 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace DrumKit
|
|
|
|
|
{
|
|
|
|
|
[XmlType("drumkitConfig")]
|
|
|
|
|
public class DrumkitConfig
|
|
|
|
|
{
|
2013-11-18 18:11:53 +00:00
|
|
|
|
[XmlIgnore()]
|
|
|
|
|
public Dictionary<string, DrumConfig> Drums { get; private set; }
|
|
|
|
|
|
2013-11-18 18:06:17 +00:00
|
|
|
|
[XmlArray("drums")]
|
2013-11-18 18:11:53 +00:00
|
|
|
|
public DrumConfig[] DrumsList
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
List<DrumConfig> configs = new List<DrumConfig>();
|
|
|
|
|
|
|
|
|
|
foreach (var i in Drums)
|
|
|
|
|
configs.Add(i.Value);
|
|
|
|
|
|
|
|
|
|
return configs.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
foreach (var i in value)
|
|
|
|
|
Drums.Add(i.TargetId, i);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Constructor
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DrumkitConfig()
|
|
|
|
|
{
|
|
|
|
|
this.Drums = new Dictionary<string, DrumConfig>();
|
|
|
|
|
}
|
2013-11-18 18:06:17 +00:00
|
|
|
|
}
|
|
|
|
|
}
|