public List <Sample> GetDisplayedSamples() { var criteria = new SearchCriteria(); var loopTypeText = LoopFilter; if (loopTypeText.Contains("Primary")) { criteria.Primary = true; criteria.LoopMode = LoopMode.FullLoop; } else if (loopTypeText != "") { criteria.Primary = false; if (loopTypeText.Contains("Start")) { criteria.LoopMode = LoopMode.PartialLoopAnchorStart; } else if (loopTypeText.Contains("End")) { criteria.LoopMode = LoopMode.PartialLoopAnchorEnd; } else if (loopTypeText == "Loop") { criteria.LoopMode = LoopMode.FullLoop; } } var keyText = KeyFilter; if (keyText == "Atonal") { criteria.AtonalOnly = true; criteria.Key = ""; } else { criteria.Key = KeyHelper.GetKeyFromDisplayKey(KeyFilter); criteria.AtonalOnly = false; } criteria.IncludeAtonal = IncludeAtonalFilter; criteria.MaxBpm = MaxBpm; criteria.MinBpm = MinBpm; criteria.SearchText = SearchFilter; var samples = SampleLibrary.GetSamples(criteria); return(samples); }
private void mnuExportAllSamples_Click(object sender, EventArgs e) { ExportSamples(SampleLibrary.GetSamples()); }