private void SaveLayers(SongEditorMemento memento) { List <SongEditorLayer> layers = layerManager.GetLayers(); foreach (SongEditorLayer layer in layers) { SongEditorLayer layerCopy = layer.CloneDeep(); memento.Layers.Add(layerCopy); } }
public SongEditorLayer CloneDeep() { SongEditorLayer clone = new SongEditorLayer(LayerKey); clone.Color = Color; clone.IsEnabled = IsEnabled; foreach (Note note in notes) { Note noteCopy = note.Clone(); clone.AddNote(noteCopy); } return(clone); }