private void EditSample() { var sample = GetSelectedSample(); if (sample == null) return; var track = SampleLibrary.GetTrackFromSample(sample); if (track == null) return; StopSamples(); var initialSample = sample.Description; var form = new FrmEditTrackSamples { BassPlayer = BassPlayer, Filename = track.Filename, SampleLibrary = SampleLibrary, Library = SampleLibrary.TrackLibrary, InitialSample = initialSample }; var result = form.ShowDialog(); if (result == DialogResult.OK) { BindData(); } }
private void EditSample() { var sampleModel = GetSelectedSampleModel(); if (sampleModel == null) return; PauseSamples(); var audioFile = sampleModel.AudioFile; var samples = audioFile.Samples.Select(GetNewLibarySample).ToList(); var initialSample = sampleModel.Sample.Key; var form = new FrmEditTrackSamples { BassPlayer = BassPlayer, Filename = audioFile.Path, SampleLibrary = SampleLibrary, Library = Library, Samples = samples, InitialSample = initialSample }; if (form.ShowDialog() != DialogResult.OK) return; var newSamples = form.Samples.Select(GetNewModuleSample).ToList(); audioFile.Samples = newSamples; ModulePlayer.UpdateAudioFile(audioFile); BindData(); }
/// <summary> /// Edits the samples for the selected track /// </summary> private void EditSamples() { if (GetSelectedTrack() == null) return; var form = new FrmEditTrackSamples { BassPlayer = BassPlayer, Filename = GetSelectedTrack().Filename, SampleLibrary = SampleLibrary, Library = Library }; form.ShowDialog(); }