Пример #1
0
 public void PlayFile(string fileName)
 {
     CancelCurrentOperation();
     playback.Load(fileName);
     aggregator.NotificationCount = 882;
     playback.Play();
 }
Пример #2
0
        private void OpenFile()
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter = "All Supported Files (*.wav;*.mp3)|*.wav;*.mp3|All Files (*.*)|*.*";
            bool?result = openFileDialog.ShowDialog();

            if (result.HasValue && result.Value)
            {
                this.selectedFile = openFileDialog.FileName;
                audioPlayback.Load(this.selectedFile);
            }
        }