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("drumkit")]
|
|
|
|
|
public class Drumkit
|
|
|
|
|
{
|
|
|
|
|
[XmlElement("name")]
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
[XmlElement("description")]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
[XmlElement("configfile")]
|
|
|
|
|
public string ConfigFilePath { get; set; }
|
|
|
|
|
|
|
|
|
|
[XmlElement("layoutfile")]
|
|
|
|
|
public string LayoutFilePath { get; set; }
|
|
|
|
|
|
2013-11-18 18:11:53 +00:00
|
|
|
|
[XmlIgnore()]
|
|
|
|
|
public Dictionary<string, Drum> Drums { get; private set; }
|
|
|
|
|
|
2013-11-18 18:06:17 +00:00
|
|
|
|
[XmlArray("drums")]
|
2013-11-18 18:11:53 +00:00
|
|
|
|
public Drum[] DrumsList {
|
|
|
|
|
get {
|
|
|
|
|
List<Drum> drums = new List<Drum>();
|
|
|
|
|
|
|
|
|
|
foreach (var i in Drums)
|
|
|
|
|
drums.Add(i.Value);
|
|
|
|
|
|
|
|
|
|
return drums.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set {
|
|
|
|
|
foreach (var i in value)
|
|
|
|
|
Drums.Add(i.Id, i);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[XmlIgnore()]
|
|
|
|
|
public Windows.Storage.StorageFolder RootFolder { get; set; }
|
2013-11-18 18:06:17 +00:00
|
|
|
|
|
|
|
|
|
public Drumkit()
|
|
|
|
|
{
|
|
|
|
|
this.Name = null;
|
|
|
|
|
this.Description = null;
|
|
|
|
|
this.ConfigFilePath = null;
|
|
|
|
|
this.LayoutFilePath = null;
|
2013-11-18 18:11:53 +00:00
|
|
|
|
this.Drums = new Dictionary<string,Drum>();
|
|
|
|
|
this.RootFolder = null;
|
2013-11-18 18:06:17 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|