/// <summary> /// /// </summary> public void Clear() { for (var index = 0; index < (int)ProgramBank.SynthesisType.Last; index++) { Programs[index].CopiedPatches.Clear(); } Combis.CopiedPatches.Clear(); SetListSlots.CopiedPatches.Clear(); DrumKits.CopiedPatches.Clear(); DrumPatterns.CopiedPatches.Clear(); WaveSequences.CopiedPatches.Clear(); PasteDuplicatesExecuted = false; PastePcgMemory = null; ProtectedPatches.Clear(); }
/// <summary> /// /// </summary> /// <param name="patchToPaste"></param> /// <param name="patch"></param> public void PastePatch(IClipBoardPatch patchToPaste, IPatch patch) { // Copy patch from clipboard to PCG. patch.PcgRoot.CopyPatch(patchToPaste, patch); patchToPaste.PasteDestination = patch; ProtectedPatches.Add(patch); if (CutPasteSelected) { var program = patch as IProgram; if (program != null) { FixReferencesToProgram(patchToPaste, program); } else { var combi = patch as ICombi; if (combi != null) { FixReferencesToCombi(patchToPaste, combi); } else { var drumKit = patch as IDrumKit; if (drumKit != null) { FixReferencesToDrumKit(patchToPaste, drumKit); } else { var drumPattern = patch as IDrumPattern; if (drumPattern != null) { FixReferencesToDrumPattern(patchToPaste, drumPattern); } } } } // If it is a set list slot do nothing. } }